diff options
Diffstat (limited to 'src/graphics/common/light.h')
-rw-r--r-- | src/graphics/common/light.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/graphics/common/light.h b/src/graphics/common/light.h index 0ad32a8..1d14c5b 100644 --- a/src/graphics/common/light.h +++ b/src/graphics/common/light.h @@ -29,9 +29,9 @@ namespace Gfx { /** \enum LightType Type of light */ enum LightType { - LT_Point, - LT_Spot, - LT_Directional + LT_Point, + LT_Spot, + LT_Directional }; /** @@ -43,41 +43,41 @@ enum LightType */ struct Light { - //! Type of light source - Gfx::LightType type; - //! Color of light - Gfx::Color color; - //! Position in world space - Math::Vector position; - //! Direction in world space - Math::Vector direction; - //! Cutoff range - float range; - //! Falloff - float falloff; - //! Constant attenuation - float attenuation0; - //! Linear attenuation - float attenuation1; - //! Quadratic attenuation - float attenuation2; - //! Inner angle of spotlight cone - float theta; - //! Outer angle of spotlight cone - float phi; - - Light() : type(LT_Point), range(0.0f), falloff(0.0f), - attenuation0(0.0f), attenuation1(0.0f), attenuation2(0.0f), - theta(0.0f), phi(0.0f) {} + //! Type of light source + Gfx::LightType type; + //! Color of light + Gfx::Color color; + //! Position in world space + Math::Vector position; + //! Direction in world space + Math::Vector direction; + //! Cutoff range + float range; + //! Falloff + float falloff; + //! Constant attenuation + float attenuation0; + //! Linear attenuation + float attenuation1; + //! Quadratic attenuation + float attenuation2; + //! Inner angle of spotlight cone + float theta; + //! Outer angle of spotlight cone + float phi; + + Light() : type(LT_Point), range(0.0f), falloff(0.0f), + attenuation0(0.0f), attenuation1(0.0f), attenuation2(0.0f), + theta(0.0f), phi(0.0f) {} }; struct LightProg { - float starting; - float ending; - float current; - float progress; - float speed; + float starting; + float ending; + float current; + float progress; + float speed; }; /** @@ -87,24 +87,24 @@ struct LightProg */ struct SceneLight { - //! true -> light exists - bool used; - //! true -> light turned on - bool enable; - - //! Type of all objects included - //D3DTypeObj incluType; - //! Type of all objects excluded - //D3DTypeObj excluType; - - //! Configuration of the light - Gfx::Light light; - - //! intensity (0 .. 1) - Gfx::LightProg intensity; - Gfx::LightProg colorRed; - Gfx::LightProg colorGreen; - Gfx::LightProg colorBlue; + //! true -> light exists + bool used; + //! true -> light turned on + bool enable; + + //! Type of all objects included + //D3DTypeObj incluType; + //! Type of all objects excluded + //D3DTypeObj excluType; + + //! Configuration of the light + Gfx::Light light; + + //! intensity (0 .. 1) + Gfx::LightProg intensity; + Gfx::LightProg colorRed; + Gfx::LightProg colorGreen; + Gfx::LightProg colorBlue; }; // TODO CLight |