Irrlicht 3D Engine
SLight.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __S_LIGHT_H_INCLUDED__
6 #define __S_LIGHT_H_INCLUDED__
7 
8 #include "SColor.h"
9 
10 namespace irr
11 {
12 namespace video
13 {
14 
17 {
24 
27 };
28 
30 const c8* const LightTypeNames[] =
31 {
32  "Point",
33  "Spot",
34  "Directional",
35  0
36 };
37 
39 
41 struct SLight
42 {
43  SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
44  SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
45  OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
46  Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
47  Radius(100.f), Type(ELT_POINT), CastShadows(true)
48  {}
49 
52 
54 
56 
58 
60 
62 
66 
69 
72 
75 
77 
79 
81 
83 
86 
89 
91  bool CastShadows:1;
92 };
93 
94 } // end namespace video
95 } // end namespace irr
96 
97 #endif
98 
f32 Falloff
The light strength's decrease between Outer and Inner cone.
Definition: SLight.h:74
spot light, it has a position in space, a direction, and a limited cone of influence
Definition: SLight.h:21
SColorf AmbientColor
Ambient color emitted by the light.
Definition: SLight.h:51
float f32
32 bit floating point variable.
Definition: irrTypes.h:108
char c8
8 bit character variable.
Definition: irrTypes.h:35
core::vector3df Direction
Read-ONLY! Direction of the light.
Definition: SLight.h:82
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
f32 OuterCone
The angle of the spot's outer cone. Ignored for other lights.
Definition: SLight.h:68
point light, it has a position in space and radiates light in all directions
Definition: SLight.h:19
structure for holding data describing a dynamic point light.
Definition: SLight.h:41
E_LIGHT_TYPE
Enumeration for different types of lights.
Definition: SLight.h:16
E_LIGHT_TYPE Type
Read-ONLY! Type of the light. Default: ELT_POINT.
Definition: SLight.h:88
f32 Radius
Read-ONLY! Radius of light. Everything within this radius will be lighted.
Definition: SLight.h:85
const c8 *const LightTypeNames[]
Names for light types.
Definition: SLight.h:30
SColorf DiffuseColor
Diffuse color emitted by the light.
Definition: SLight.h:55
SColorf SpecularColor
Specular color emitted by the light.
Definition: SLight.h:59
f32 InnerCone
The angle of the spot's inner cone. Ignored for other lights.
Definition: SLight.h:71
Only used for counting the elements of this enum.
Definition: SLight.h:26
core::vector3df Position
Read-ONLY! Position of the light.
Definition: SLight.h:78
core::vector3df Attenuation
Attenuation factors (constant, linear, quadratic)
Definition: SLight.h:65
directional light, coming from a direction from an infinite distance
Definition: SLight.h:23
Class representing a color with four floats.
Definition: SColor.h:571
bool CastShadows
Read-ONLY! Does the light cast shadows?
Definition: SLight.h:91