aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/SLight.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/include/SLight.h')
-rw-r--r--libraries/irrlicht-1.8/include/SLight.h196
1 files changed, 98 insertions, 98 deletions
diff --git a/libraries/irrlicht-1.8/include/SLight.h b/libraries/irrlicht-1.8/include/SLight.h
index f809d2e..022c40a 100644
--- a/libraries/irrlicht-1.8/include/SLight.h
+++ b/libraries/irrlicht-1.8/include/SLight.h
@@ -1,98 +1,98 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __S_LIGHT_H_INCLUDED__ 5#ifndef __S_LIGHT_H_INCLUDED__
6#define __S_LIGHT_H_INCLUDED__ 6#define __S_LIGHT_H_INCLUDED__
7 7
8#include "SColor.h" 8#include "SColor.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace video 12namespace video
13{ 13{
14 14
15//! Enumeration for different types of lights 15//! Enumeration for different types of lights
16enum E_LIGHT_TYPE 16enum E_LIGHT_TYPE
17{ 17{
18 //! point light, it has a position in space and radiates light in all directions 18 //! point light, it has a position in space and radiates light in all directions
19 ELT_POINT, 19 ELT_POINT,
20 //! spot light, it has a position in space, a direction, and a limited cone of influence 20 //! spot light, it has a position in space, a direction, and a limited cone of influence
21 ELT_SPOT, 21 ELT_SPOT,
22 //! directional light, coming from a direction from an infinite distance 22 //! directional light, coming from a direction from an infinite distance
23 ELT_DIRECTIONAL, 23 ELT_DIRECTIONAL,
24 24
25 //! Only used for counting the elements of this enum 25 //! Only used for counting the elements of this enum
26 ELT_COUNT 26 ELT_COUNT
27}; 27};
28 28
29//! Names for light types 29//! Names for light types
30const c8* const LightTypeNames[] = 30const c8* const LightTypeNames[] =
31{ 31{
32 "Point", 32 "Point",
33 "Spot", 33 "Spot",
34 "Directional", 34 "Directional",
35 0 35 0
36}; 36};
37 37
38//! structure for holding data describing a dynamic point light. 38//! structure for holding data describing a dynamic point light.
39/** Irrlicht supports point lights, spot lights, and directional lights. 39/** Irrlicht supports point lights, spot lights, and directional lights.
40*/ 40*/
41struct SLight 41struct SLight
42{ 42{
43 SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f), 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), 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), 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), 46 Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
47 Radius(100.f), Type(ELT_POINT), CastShadows(true) 47 Radius(100.f), Type(ELT_POINT), CastShadows(true)
48 {} 48 {}
49 49
50 //! Ambient color emitted by the light 50 //! Ambient color emitted by the light
51 SColorf AmbientColor; 51 SColorf AmbientColor;
52 52
53 //! Diffuse color emitted by the light. 53 //! Diffuse color emitted by the light.
54 /** This is the primary color you want to set. */ 54 /** This is the primary color you want to set. */
55 SColorf DiffuseColor; 55 SColorf DiffuseColor;
56 56
57 //! Specular color emitted by the light. 57 //! Specular color emitted by the light.
58 /** For details how to use specular highlights, see SMaterial::Shininess */ 58 /** For details how to use specular highlights, see SMaterial::Shininess */
59 SColorf SpecularColor; 59 SColorf SpecularColor;
60 60
61 //! Attenuation factors (constant, linear, quadratic) 61 //! Attenuation factors (constant, linear, quadratic)
62 /** Changes the light strength fading over distance. 62 /** Changes the light strength fading over distance.
63 Can also be altered by setting the radius, Attenuation will change to 63 Can also be altered by setting the radius, Attenuation will change to
64 (0,1.f/radius,0). Can be overridden after radius was set. */ 64 (0,1.f/radius,0). Can be overridden after radius was set. */
65 core::vector3df Attenuation; 65 core::vector3df Attenuation;
66 66
67 //! The angle of the spot's outer cone. Ignored for other lights. 67 //! The angle of the spot's outer cone. Ignored for other lights.
68 f32 OuterCone; 68 f32 OuterCone;
69 69
70 //! The angle of the spot's inner cone. Ignored for other lights. 70 //! The angle of the spot's inner cone. Ignored for other lights.
71 f32 InnerCone; 71 f32 InnerCone;
72 72
73 //! The light strength's decrease between Outer and Inner cone. 73 //! The light strength's decrease between Outer and Inner cone.
74 f32 Falloff; 74 f32 Falloff;
75 75
76 //! Read-ONLY! Position of the light. 76 //! Read-ONLY! Position of the light.
77 /** If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position. */ 77 /** If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position. */
78 core::vector3df Position; 78 core::vector3df Position;
79 79
80 //! Read-ONLY! Direction of the light. 80 //! Read-ONLY! Direction of the light.
81 /** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */ 81 /** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */
82 core::vector3df Direction; 82 core::vector3df Direction;
83 83
84 //! Read-ONLY! Radius of light. Everything within this radius will be lighted. 84 //! Read-ONLY! Radius of light. Everything within this radius will be lighted.
85 f32 Radius; 85 f32 Radius;
86 86
87 //! Read-ONLY! Type of the light. Default: ELT_POINT 87 //! Read-ONLY! Type of the light. Default: ELT_POINT
88 E_LIGHT_TYPE Type; 88 E_LIGHT_TYPE Type;
89 89
90 //! Read-ONLY! Does the light cast shadows? 90 //! Read-ONLY! Does the light cast shadows?
91 bool CastShadows:1; 91 bool CastShadows:1;
92}; 92};
93 93
94} // end namespace video 94} // end namespace video
95} // end namespace irr 95} // end namespace irr
96 96
97#endif 97#endif
98 98