17 NONE = 0, DIRECTIONAL = 1, POINT = 2, SPOT = 3
25 void Exterminate()
override;
29 void Tick(
float elapsedTime)
override;
31 void SetLightType(LIGHT type);
33 void SetDirection(
const vec4& direction)
const;
35 void SetColor(
const vec3& color)
const;
37 LIGHT GetType()
const;
39 vec4 GetDirection(
const vec4& direction)
const;
41 vec3 GetColor()
const;
44 void SetLightRadius(
float radius)
const;
46 void SetAttenuationFactor(
const vec3& att)
const;
48 void SetAttenuationFactor(
float Kc,
float Kl,
float Kq)
const;
50 void SetSunrising(
bool active);
56 void SetShadow(
bool isActive) {
57 m_disableShadow = !isActive;
62 void SetValue(std::string name_str, Arguments value)
override;
64 std::string PrintValue()
const override;
66 const mat4& GetLightProjectionMatrix()
const;
68 const mat4& GetLightViewMatrix()
const;
74 bool IsShadow()
const;
76 void BindShadow(
const GLProgramHandle& handle,
int handleIndex,
int index)
const;
78 void RenderBackground()
const override {};
81 void SetLightPosition()
const;
85 LIGHT m_type = DIRECTIONAL;
89 bool m_isSunRising =
false;
90 bool m_disableShadow =
false;
93 mat4 m_lightProjectionMatrix;
94 mat4 m_lightViewMatrix;