conworlds

view 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
line source
1 #include "light.h"
3 Light::Light()
4 {
5 cast_shadows = false;
6 }
8 void Light::set_color(const Vector3 &color)
9 {
10 this->color = color;
11 }
13 const Vector3 &Light::get_color() const
14 {
15 return color;
16 }
18 void Light::set_attenuation(const Vector3 &att)
19 {
20 attenuation = att;
21 }
23 const Vector3 &Light::get_attenuation() const
24 {
25 return attenuation;
26 }
28 void Light::set_shadow_caster(bool s)
29 {
30 cast_shadows = s;
31 }
33 bool Light::is_shadow_caster() const
34 {
35 return cast_shadows;
36 }