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