rayzor

annotate src/light.cc @ 4:18bdbcbaee81

forgot to add stl/vector.h
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Apr 2014 01:12:50 +0300
parents 2a5340a6eee4
children d94a69933a71
rev   line source
nuclear@1 1 #include "light.h"
nuclear@1 2
nuclear@1 3 Light::Light()
nuclear@1 4 {
nuclear@1 5 color.x = color.y = color.z = 1.0;
nuclear@1 6 atten.x = 1.0;
nuclear@1 7 atten.y = 0.0;
nuclear@1 8 atten.z = 0.0;
nuclear@1 9 }
nuclear@1 10
nuclear@1 11 void Light::set_position(const Vector3 &pos)
nuclear@1 12 {
nuclear@1 13 this->pos = pos;
nuclear@1 14 }
nuclear@1 15
nuclear@1 16 const Vector3 &Light::get_position() const
nuclear@1 17 {
nuclear@1 18 return pos;
nuclear@1 19 }
nuclear@1 20
nuclear@1 21
nuclear@1 22 void Light::set_color(const Vector3 &color)
nuclear@1 23 {
nuclear@1 24 this->color = color;
nuclear@1 25 }
nuclear@1 26
nuclear@1 27 const Vector3 &Light::get_color() const
nuclear@1 28 {
nuclear@1 29 return color;
nuclear@1 30 }
nuclear@1 31
nuclear@1 32
nuclear@1 33 void Light::set_attenuation(const Vector3 &atten)
nuclear@1 34 {
nuclear@1 35 this->atten = atten;
nuclear@1 36 }
nuclear@1 37
nuclear@1 38 const Vector3 &Light::get_attenuation() const
nuclear@1 39 {
nuclear@1 40 return atten;
nuclear@1 41 }