conworlds
annotate src/light.cc @ 17:c814f77d177e
moved to SDL2
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 25 Aug 2014 22:02:08 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@13 | 1 #include "light.h" |
nuclear@13 | 2 |
nuclear@13 | 3 Light::Light() |
nuclear@13 | 4 { |
nuclear@13 | 5 cast_shadows = false; |
nuclear@13 | 6 } |
nuclear@13 | 7 |
nuclear@13 | 8 void Light::set_color(const Vector3 &color) |
nuclear@13 | 9 { |
nuclear@13 | 10 this->color = color; |
nuclear@13 | 11 } |
nuclear@13 | 12 |
nuclear@13 | 13 const Vector3 &Light::get_color() const |
nuclear@13 | 14 { |
nuclear@13 | 15 return color; |
nuclear@13 | 16 } |
nuclear@13 | 17 |
nuclear@13 | 18 void Light::set_attenuation(const Vector3 &att) |
nuclear@13 | 19 { |
nuclear@13 | 20 attenuation = att; |
nuclear@13 | 21 } |
nuclear@13 | 22 |
nuclear@13 | 23 const Vector3 &Light::get_attenuation() const |
nuclear@13 | 24 { |
nuclear@13 | 25 return attenuation; |
nuclear@13 | 26 } |
nuclear@13 | 27 |
nuclear@13 | 28 void Light::set_shadow_caster(bool s) |
nuclear@13 | 29 { |
nuclear@13 | 30 cast_shadows = s; |
nuclear@13 | 31 } |
nuclear@13 | 32 |
nuclear@13 | 33 bool Light::is_shadow_caster() const |
nuclear@13 | 34 { |
nuclear@13 | 35 return cast_shadows; |
nuclear@13 | 36 } |