diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-19 23:50:28 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-19 23:50:28 +0200 |
commit | 7b6bbf79c4bb73013e2fe01f84f0025e7c06c00e (patch) | |
tree | 18196404b7f9a7c000f006076030e1d568302e5d /src/graphics/core/light.h | |
parent | 7479f486b671acb2a6aea2c84a56b383aaba00ca (diff) | |
download | colobot-7b6bbf79c4bb73013e2fe01f84f0025e7c06c00e.tar.gz colobot-7b6bbf79c4bb73013e2fe01f84f0025e7c06c00e.tar.bz2 colobot-7b6bbf79c4bb73013e2fe01f84f0025e7c06c00e.zip |
Namespace and styling fix
Diffstat (limited to 'src/graphics/core/light.h')
-rw-r--r-- | src/graphics/core/light.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/graphics/core/light.h b/src/graphics/core/light.h index 0601c5b..35f37e6 100644 --- a/src/graphics/core/light.h +++ b/src/graphics/core/light.h @@ -24,14 +24,17 @@ #include "graphics/core/color.h" + #include "math/vector.h" +// Graphics module namespace namespace Gfx { /** - \enum LightType - \brief Type of light in 3D scene */ + * \enum LightType + * \brief Type of light in 3D scene + */ enum LightType { LIGHT_POINT, @@ -40,20 +43,21 @@ enum LightType }; /** - \struct Light - \brief Properties of light in 3D scene - - This structure was created as analog to DirectX's D3DLIGHT. */ + * \struct Light + * \brief Properties of light in 3D scene + * + * This structure was created as analog to DirectX's D3DLIGHT. + */ struct Light { //! Type of light source - Gfx::LightType type; + LightType type; //! Color of ambient light - Gfx::Color ambient; + Color ambient; //! Color of diffuse light - Gfx::Color diffuse; + Color diffuse; //! Color of specular light - Gfx::Color specular; + Color specular; //! Position in world space (for point & spot lights) Math::Vector position; //! Direction in world space (for directional & spot lights) @@ -80,9 +84,9 @@ struct Light void LoadDefault() { type = LIGHT_POINT; - ambient = Gfx::Color(0.4f, 0.4f, 0.4f); - diffuse = Gfx::Color(0.8f, 0.8f, 0.8f); - specular = Gfx::Color(1.0f, 1.0f, 1.0f); + ambient = Color(0.4f, 0.4f, 0.4f); + diffuse = Color(0.8f, 0.8f, 0.8f); + specular = Color(1.0f, 1.0f, 1.0f); position = Math::Vector(0.0f, 0.0f, 0.0f); direction = Math::Vector(0.0f, 0.0f, 1.0f); attenuation0 = 1.0f; @@ -92,4 +96,5 @@ struct Light } }; -}; // namespace Gfx + +} // namespace Gfx |