1 #ifndef MSP_GL_DIRECTIONALLIGHT_H_
2 #define MSP_GL_DIRECTIONALLIGHT_H_
11 A light source which has uniform direction and strength everywhere.
13 class DirectionalLight: public Light
16 class Loader: public DataFile::DerivedObjectLoader<DirectionalLight, Light::Loader>
19 static ActionMap shared_actions;
22 Loader(DirectionalLight &);
25 virtual void init_actions();
27 void direction(float, float, float);
41 /** Sets the light's direction from a matrix. The negative Z axis is used
42 as the direction. Other axes and translation are ignored. */
43 virtual void set_matrix(const Matrix &);
45 void set_direction(const Vector3 &);
47 const Vector3 &get_direction() const { return direction; }
49 /** Sets a multiplier on how much light actually reaches the target. Used
50 when modeling an atmosphere. */
51 void set_transmittance(const Color &);
54 virtual void update_shader_data(ProgramData &, const std::string &) const;