diff options
author | Zaba999 <zaba.marcin@gmail.com> | 2012-09-20 23:04:37 +0200 |
---|---|---|
committer | Zaba999 <zaba.marcin@gmail.com> | 2012-09-20 23:04:37 +0200 |
commit | 34a11021daca9d6b51e8cc29c1562a75815df7b3 (patch) | |
tree | 7d1427b27337d32224cf66cc114adf4f3665bbee /src/graphics/core/light.h | |
parent | 191fdc614ed8022c145d3530f9d412e715ae37db (diff) | |
parent | e25823f98437461826b52521bcf9d70eb11a00b3 (diff) | |
download | colobot-34a11021daca9d6b51e8cc29c1562a75815df7b3.tar.gz colobot-34a11021daca9d6b51e8cc29c1562a75815df7b3.tar.bz2 colobot-34a11021daca9d6b51e8cc29c1562a75815df7b3.zip |
changed paths for models and levels. Now it's possible to load level. Merged with latest trunk
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 |