rayzor

view src/light.cc @ 0:2a5340a6eee4

rayzor first commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 08:46:27 +0300
parents
children a826bf0fb169
line source
1 #include "light.h"
3 Light::Light()
4 {
5 color.x = color.y = color.z = 1.0;
6 atten.x = 1.0;
7 atten.y = 0.0;
8 atten.z = 0.0;
9 }
11 void Light::set_position(const Vector3 &pos)
12 {
13 this->pos = pos;
14 }
16 const Vector3 &Light::get_position() const
17 {
18 return pos;
19 }
22 void Light::set_color(const Vector3 &color)
23 {
24 this->color = color;
25 }
27 const Vector3 &Light::get_color() const
28 {
29 return color;
30 }
33 void Light::set_attenuation(const Vector3 &atten)
34 {
35 this->atten = atten;
36 }
38 const Vector3 &Light::get_attenuation() const
39 {
40 return atten;
41 }