Path Tracer
light.h
Go to the documentation of this file.
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
5 
6 Copyright (c) 2006-2020, assimp team
7 
8 
9 
10 All rights reserved.
11 
12 Redistribution and use of this software in source and binary forms,
13 with or without modification, are permitted provided that the following
14 conditions are met:
15 
16 * Redistributions of source code must retain the above
17  copyright notice, this list of conditions and the
18  following disclaimer.
19 
20 * Redistributions in binary form must reproduce the above
21  copyright notice, this list of conditions and the
22  following disclaimer in the documentation and/or other
23  materials provided with the distribution.
24 
25 * Neither the name of the assimp team, nor the names of its
26  contributors may be used to endorse or promote products
27  derived from this software without specific prior
28  written permission of the assimp team.
29 
30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 ---------------------------------------------------------------------------
42 */
43 
48 #pragma once
49 #ifndef AI_LIGHT_H_INC
50 #define AI_LIGHT_H_INC
51 
52 #ifdef __GNUC__
53 # pragma GCC system_header
54 #endif
55 
56 #include <assimp/types.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 // ---------------------------------------------------------------------------
66 {
67  aiLightSource_UNDEFINED = 0x0,
68 
73 
78 
84 
91 
96 
100 #ifndef SWIG
101  _aiLightSource_Force32Bit = INT_MAX
102 #endif
103 };
104 
105 // ---------------------------------------------------------------------------
118 struct aiLight
119 {
126  C_STRUCT aiString mName;
127 
133 
140 
148 
155  C_STRUCT aiVector3D mUp;
156 
168 
180 
192 
200 
208 
218 
226 
238 
240  C_STRUCT aiVector2D mSize;
241 
242 #ifdef __cplusplus
243 
244  aiLight() AI_NO_EXCEPT
245  : mType (aiLightSource_UNDEFINED)
246  , mAttenuationConstant (0.f)
247  , mAttenuationLinear (1.f)
248  , mAttenuationQuadratic (0.f)
249  , mAngleInnerCone ((float)AI_MATH_TWO_PI)
250  , mAngleOuterCone ((float)AI_MATH_TWO_PI)
251  , mSize (0.f, 0.f)
252  {
253  }
254 
255 #endif
256 };
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 
263 #endif // !! AI_LIGHT_H_INC
aiLight::mPosition
C_STRUCT aiVector3D mPosition
Definition: light.h:139
aiVector3D
Definition: vector3.h:136
types.h
aiLight::mAttenuationQuadratic
float mAttenuationQuadratic
Definition: light.h:191
aiLight
Definition: light.h:119
aiLightSourceType
aiLightSourceType
Definition: light.h:66
aiLight::mAngleInnerCone
float mAngleInnerCone
Definition: light.h:225
aiLight::mColorSpecular
C_STRUCT aiColor3D mColorSpecular
Definition: light.h:207
_aiLightSource_Force32Bit
@ _aiLightSource_Force32Bit
Definition: light.h:101
aiLight::mType
C_ENUM aiLightSourceType mType
Definition: light.h:132
aiLightSource_POINT
@ aiLightSource_POINT
Definition: light.h:77
aiLight::mAttenuationLinear
float mAttenuationLinear
Definition: light.h:179
aiColor3D
Definition: types.h:165
aiLight::mUp
C_STRUCT aiVector3D mUp
Definition: light.h:155
aiLight::mAngleOuterCone
float mAngleOuterCone
Definition: light.h:237
aiLightSource_SPOT
@ aiLightSource_SPOT
Definition: light.h:83
aiString
Definition: types.h:266
aiVector2D
Definition: vector2.h:105
aiLightSource_AMBIENT
@ aiLightSource_AMBIENT
Definition: light.h:90
aiLight::mColorDiffuse
C_STRUCT aiColor3D mColorDiffuse
Definition: light.h:199
aiLightSource_AREA
@ aiLightSource_AREA
Definition: light.h:95
aiLight::mDirection
C_STRUCT aiVector3D mDirection
Definition: light.h:147
aiLight::mName
C_STRUCT aiString mName
Definition: light.h:126
aiLightSource_DIRECTIONAL
@ aiLightSource_DIRECTIONAL
Definition: light.h:72
aiLight::mColorAmbient
C_STRUCT aiColor3D mColorAmbient
Definition: light.h:217
aiLight::mSize
C_STRUCT aiVector2D mSize
Definition: light.h:240
aiLight::mAttenuationConstant
float mAttenuationConstant
Definition: light.h:167