BRE12
light.h
Go to the documentation of this file.
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
5 
6 Copyright (c) 2006-2012, assimp team
7 
8 All rights reserved.
9 
10 Redistribution and use of this software in source and binary forms,
11 with or without modification, are permitted provided that the following
12 conditions are met:
13 
14 * Redistributions of source code must retain the above
15  copyright notice, this list of conditions and the
16  following disclaimer.
17 
18 * Redistributions in binary form must reproduce the above
19  copyright notice, this list of conditions and the
20  following disclaimer in the documentation and/or other
21  materials provided with the distribution.
22 
23 * Neither the name of the assimp team, nor the names of its
24  contributors may be used to endorse or promote products
25  derived from this software without specific prior
26  written permission of the assimp team.
27 
28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 ---------------------------------------------------------------------------
40 */
41 
46 #ifndef __AI_LIGHT_H_INC__
47 #define __AI_LIGHT_H_INC__
48 
49 #include "types.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 // ---------------------------------------------------------------------------
59 {
60  aiLightSource_UNDEFINED = 0x0,
61 
66 
71 
77 
78 
82 #ifndef SWIG
84 #endif
85 };
86 
87 // ---------------------------------------------------------------------------
100 struct aiLight
101 {
108  C_STRUCT aiString mName;
109 
115 
122 
130 
142 
154 
166 
174 
182 
192 
200 
212 
213 #ifdef __cplusplus
214 
215  aiLight()
216  : mType (aiLightSource_UNDEFINED)
217  , mAttenuationConstant (0.f)
218  , mAttenuationLinear (1.f)
219  , mAttenuationQuadratic (0.f)
220  , mAngleInnerCone ((float)AI_MATH_TWO_PI)
221  , mAngleOuterCone ((float)AI_MATH_TWO_PI)
222  {
223  }
224 
225 #endif
226 };
227 
228 #ifdef __cplusplus
229 }
230 #endif
231 
232 
233 #endif // !! __AI_LIGHT_H_INC__
float mAttenuationLinear
Linear light attenuation factor.
Definition: light.h:153
aiLightSourceType
Enumerates all supported types of light sources.
Definition: light.h:58
float mAngleOuterCone
Outer angle of a spot light's light cone.
Definition: light.h:211
Basic data types and primitives, such as vectors or colors.
Helper structure to describe a light source.
Definition: light.h:100
C_STRUCT aiColor3D mColorAmbient
Ambient color of the light source.
Definition: light.h:191
C_STRUCT aiVector3D mDirection
Direction of the light source in space.
Definition: light.h:129
C_STRUCT aiColor3D mColorDiffuse
Diffuse color of the light source.
Definition: light.h:173
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:251
This value is not used.
Definition: light.h:83
C_STRUCT aiColor3D mColorSpecular
Specular color of the light source.
Definition: light.h:181
float mAttenuationConstant
Constant light attenuation factor.
Definition: light.h:141
Definition: vector3.h:134
Represents a color in Red-Green-Blue space.
Definition: types.h:159
C_STRUCT aiVector3D mPosition
Position of the light source in space.
Definition: light.h:121
A directional light source has a well-defined direction but is infinitely far away.
Definition: light.h:65
float mAttenuationQuadratic
Quadratic light attenuation factor.
Definition: light.h:165
float mAngleInnerCone
Inner angle of a spot light's light cone.
Definition: light.h:199
A spot light source emits light in a specific angle.
Definition: light.h:76
C_STRUCT aiString mName
The name of the light source.
Definition: light.h:108
A point light source has a well-defined position in space but no direction - it emits light in all di...
Definition: light.h:70
C_ENUM aiLightSourceType mType
The type of the light source.
Definition: light.h:114