7 #ifndef NAZARA_LIGHT_HPP 8 #define NAZARA_LIGHT_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Core/Color.hpp> 12 #include <Nazara/Graphics/Enums.hpp> 13 #include <Nazara/Graphics/Renderable.hpp> 14 #include <Nazara/Renderer/Texture.hpp> 21 Light(LightType type = LightType_Point);
29 Light* Create()
const;
31 bool Cull(
const Frustumf& frustum,
const Matrix4f& transformMatrix)
const override;
33 inline void EnableShadowCasting(
bool castShadows);
35 inline void EnsureShadowMapUpdate()
const;
37 inline float GetAmbientFactor()
const;
38 inline float GetAttenuation()
const;
39 inline Color GetColor()
const;
40 inline float GetDiffuseFactor()
const;
41 inline float GetInnerAngle()
const;
42 inline float GetInnerAngleCosine()
const;
43 inline float GetInvRadius()
const;
44 inline LightType GetLightType()
const;
45 inline float GetOuterAngle()
const;
46 inline float GetOuterAngleCosine()
const;
47 inline float GetOuterAngleTangent()
const;
48 inline float GetRadius()
const;
50 inline PixelFormatType GetShadowMapFormat()
const;
51 inline const Vector2ui& GetShadowMapSize()
const;
53 inline bool IsShadowCastingEnabled()
const;
55 inline void SetAmbientFactor(
float factor);
56 inline void SetAttenuation(
float attenuation);
57 inline void SetColor(
const Color& color);
58 inline void SetDiffuseFactor(
float factor);
59 inline void SetInnerAngle(
float innerAngle);
60 inline void SetLightType(LightType type);
61 inline void SetOuterAngle(
float outerAngle);
62 inline void SetRadius(
float radius);
63 inline void SetShadowMapFormat(PixelFormatType shadowFormat);
64 inline void SetShadowMapSize(
const Vector2ui& size);
66 void UpdateBoundingVolume(
const Matrix4f& transformMatrix)
override;
72 void MakeBoundingVolume()
const override;
73 inline void InvalidateShadowMap();
74 void UpdateShadowMap()
const;
78 PixelFormatType m_shadowMapFormat;
81 bool m_shadowCastingEnabled;
82 mutable bool m_shadowMapUpdated;
83 float m_ambientFactor;
85 float m_diffuseFactor;
87 float m_innerAngleCosine;
90 float m_outerAngleCosine;
91 float m_outerAngleTangent;
97 struct UniformLocations
102 int lightViewProjMatrix;
113 UniformLocations locations;
119 #include <Nazara/Graphics/Light.inl> 121 #endif // NAZARA_LIGHT_HPP Math class that represents a frustum in the three dimensional vector space.
Definition: Frustum.hpp:24
Core class that represents a color.
Definition: Color.hpp:18
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Graphics class that represents a light.
Definition: Light.hpp:18
Graphics class that represents the rendering queue for our scene.
Definition: AbstractRenderQueue.hpp:26
Graphics class that represents a renderable element for our scene.
Definition: Renderable.hpp:19