conworlds

view src/light.cc @ 13:283cdfa7dda2

added a crapload of code from goat3dgfx
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 24 Aug 2014 09:41:24 +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 }