-void Light::set_transmittance(const Color &t)
-{
- transmittance = t;
- ++generation;
-}
-
-void Light::set_matrix(const Matrix &m)
-{
- Placeable::set_matrix(m);
- position = matrix.column(3);
- spot_dir = normalize(-matrix.column(2).slice<3>(0));
- direction = (position.w ? spot_dir : normalize(-position.slice<3>(0)));
- update_matrix();
- ++generation;
-}
-
-void Light::set_position(const Vector4 &p)
-{
- position = p;
- if(!position.w)
- direction = normalize(-position.slice<3>(0));
- update_matrix();
- ++generation;
-}
-
-void Light::set_spot_direction(const Vector3 &d)
-{
- spot_dir = normalize(d);
- if(position.w)
- direction = spot_dir;
- update_matrix();
- ++generation;
-}
-
-void Light::set_spot_exponent(float e)
-{
- if(e<0)
- throw invalid_argument("Light::set_spot_exponent");
-
- spot_exp = e;
- ++generation;
-}
-
-void Light::set_spot_cutoff(const Geometry::Angle<float> &c)
-{
- if(c<Geometry::Angle<float>::zero() || (c>Geometry::Angle<float>::right() && c!=Geometry::Angle<float>::straight()))
- throw invalid_argument("Light::set_spot_cutoff");
-
- spot_cutoff = c;
- ++generation;
-}
-
-void Light::disable_spot_cutoff()
-{
- set_spot_cutoff(Geometry::Angle<float>::straight());
- ++generation;
-}
-
-void Light::set_attenuation(float c, float l, float q)