1 #ifndef MSP_GL_POINTLIGHT_H_
2 #define MSP_GL_POINTLIGHT_H_
11 A positional, omnidirectional light source. The light's strength can be
12 attenuated based on distance.
14 class PointLight: public Light
17 class Loader: public DataFile::DerivedObjectLoader<PointLight, Light::Loader>
20 static ActionMap shared_actions;
26 virtual void init_actions();
28 void attenuation(float, float, float);
29 void position(float, float, float);
33 Vector3 position = { 0.0f, 0.0f, 0.0f };
34 float attenuation[3] = { 1.0f, 0.0f, 1.0f };
39 /** Sets the light's position from a matrix. Only the translation part is
41 virtual void set_matrix(const Matrix &);
43 void set_position(const Vector3 &);
44 const Vector3 &get_position();
46 /** Sets the constant, linear and quadratic attentuation factors for the
48 void set_attenuation(float, float, float);
50 const float *get_attenuation() const { return attenuation; }
53 virtual void update_shader_data(ProgramData &, const std::string &) const;