goat3dgfx
annotate src/light.cc @ 31:3ba80928b530
fixed the build
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 02 Mar 2014 04:20:00 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@30 | 1 #include "light.h" |
nuclear@30 | 2 |
nuclear@30 | 3 using namespace goatgfx; |
nuclear@30 | 4 |
nuclear@30 | 5 Light::Light() |
nuclear@30 | 6 { |
nuclear@30 | 7 cast_shadows = false; |
nuclear@30 | 8 } |
nuclear@30 | 9 |
nuclear@30 | 10 void Light::set_color(const Vector3 &color) |
nuclear@30 | 11 { |
nuclear@30 | 12 this->color = color; |
nuclear@30 | 13 } |
nuclear@30 | 14 |
nuclear@30 | 15 const Vector3 &Light::get_color() const |
nuclear@30 | 16 { |
nuclear@30 | 17 return color; |
nuclear@30 | 18 } |
nuclear@30 | 19 |
nuclear@30 | 20 void Light::set_attenuation(const Vector3 &att) |
nuclear@30 | 21 { |
nuclear@30 | 22 attenuation = att; |
nuclear@30 | 23 } |
nuclear@30 | 24 |
nuclear@30 | 25 const Vector3 &Light::get_attenuation() const |
nuclear@30 | 26 { |
nuclear@30 | 27 return attenuation; |
nuclear@30 | 28 } |
nuclear@30 | 29 |
nuclear@30 | 30 void Light::set_shadow_caster(bool s) |
nuclear@30 | 31 { |
nuclear@30 | 32 cast_shadows = s; |
nuclear@30 | 33 } |
nuclear@30 | 34 |
nuclear@30 | 35 bool Light::is_shadow_caster() const |
nuclear@30 | 36 { |
nuclear@30 | 37 return cast_shadows; |
nuclear@30 | 38 } |