GraphicsAPI_2020C
light.h
Go to the documentation of this file.
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
5 
6 Copyright (c) 2006-2017, assimp team
7 
8 
9 All rights reserved.
10 
11 Redistribution and use of this software in source and binary forms,
12 with or without modification, are permitted provided that the following
13 conditions are met:
14 
15 * Redistributions of source code must retain the above
16  copyright notice, this list of conditions and the
17  following disclaimer.
18 
19 * Redistributions in binary form must reproduce the above
20  copyright notice, this list of conditions and the
21  following disclaimer in the documentation and/or other
22  materials provided with the distribution.
23 
24 * Neither the name of the assimp team, nor the names of its
25  contributors may be used to endorse or promote products
26  derived from this software without specific prior
27  written permission of the assimp team.
28 
29 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 ---------------------------------------------------------------------------
41 */
42 
47 #pragma once
48 #ifndef AI_LIGHT_H_INC
49 #define AI_LIGHT_H_INC
50 
51 #include "types.h"
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 // ---------------------------------------------------------------------------
61 {
62  aiLightSource_UNDEFINED = 0x0,
63 
68 
73 
79 
86 
91 
95 #ifndef SWIG
97 #endif
98 };
99 
100 // ---------------------------------------------------------------------------
113 struct aiLight
114 {
121  C_STRUCT aiString mName;
122 
128 
135 
143 
150  C_STRUCT aiVector3D mUp;
151 
163 
175 
187 
195 
203 
213 
221 
233 
235  C_STRUCT aiVector2D mSize;
236 
237 #ifdef __cplusplus
238 
239  aiLight()
240  : mType (aiLightSource_UNDEFINED)
241  , mAttenuationConstant (0.f)
242  , mAttenuationLinear (1.f)
243  , mAttenuationQuadratic (0.f)
244  , mAngleInnerCone ((float)AI_MATH_TWO_PI)
245  , mAngleOuterCone ((float)AI_MATH_TWO_PI)
246  , mSize (0.f, 0.f)
247  {
248  }
249 
250 #endif
251 };
252 
253 #ifdef __cplusplus
254 }
255 #endif
256 
257 
258 #endif // !! AI_LIGHT_H_INC
float mAttenuationLinear
Linear light attenuation factor.
Definition: light.h:174
aiLightSourceType
Enumerates all supported types of light sources.
Definition: light.h:60
float mAngleOuterCone
Outer angle of a spot light's light cone.
Definition: light.h:232
Basic data types and primitives, such as vectors or colors.
Helper structure to describe a light source.
Definition: light.h:113
Represents a two-dimensional vector.
Definition: vector2.h:108
C_STRUCT aiColor3D mColorAmbient
Ambient color of the light source.
Definition: light.h:212
C_STRUCT aiVector3D mDirection
Direction of the light source in space.
Definition: light.h:142
C_STRUCT aiColor3D mColorDiffuse
Diffuse color of the light source.
Definition: light.h:194
An area light is a rectangle with predefined size that uniformly emits light from one of its sides...
Definition: light.h:90
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:252
This value is not used.
Definition: light.h:96
C_STRUCT aiColor3D mColorSpecular
Specular color of the light source.
Definition: light.h:202
C_STRUCT aiVector2D mSize
Size of area light source.
Definition: light.h:235
The generic light level of the world, including the bounces of all other light sources.
Definition: light.h:85
float mAttenuationConstant
Constant light attenuation factor.
Definition: light.h:162
Definition: vector3.h:135
Represents a color in Red-Green-Blue space.
Definition: types.h:158
C_STRUCT aiVector3D mPosition
Position of the light source in space.
Definition: light.h:134
A directional light source has a well-defined direction but is infinitely far away.
Definition: light.h:67
float mAttenuationQuadratic
Quadratic light attenuation factor.
Definition: light.h:186
float mAngleInnerCone
Inner angle of a spot light's light cone.
Definition: light.h:220
A spot light source emits light in a specific angle.
Definition: light.h:78
C_STRUCT aiString mName
The name of the light source.
Definition: light.h:121
A point light source has a well-defined position in space but no direction - it emits light in all di...
Definition: light.h:72
C_ENUM aiLightSourceType mType
The type of the light source.
Definition: light.h:127
C_STRUCT aiVector3D mUp
Up direction of the light source in space.
Definition: light.h:150