rayzor

annotate src/light.cc @ 14:a9a948809c6f

starting the renderer screen, plus misc stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 13 Apr 2014 08:06:21 +0300
parents a826bf0fb169
children 79609d482762
rev   line source
nuclear@1 1 #include "light.h"
nuclear@1 2
nuclear@1 3 Light::Light()
nuclear@1 4 {
nuclear@12 5 type = NODE_LIGHT;
nuclear@1 6 color.x = color.y = color.z = 1.0;
nuclear@1 7 atten.x = 1.0;
nuclear@1 8 atten.y = 0.0;
nuclear@1 9 atten.z = 0.0;
nuclear@1 10 }
nuclear@1 11
nuclear@1 12 void Light::set_color(const Vector3 &color)
nuclear@1 13 {
nuclear@1 14 this->color = color;
nuclear@1 15 }
nuclear@1 16
nuclear@1 17 const Vector3 &Light::get_color() const
nuclear@1 18 {
nuclear@1 19 return color;
nuclear@1 20 }
nuclear@1 21
nuclear@1 22
nuclear@1 23 void Light::set_attenuation(const Vector3 &atten)
nuclear@1 24 {
nuclear@1 25 this->atten = atten;
nuclear@1 26 }
nuclear@1 27
nuclear@1 28 const Vector3 &Light::get_attenuation() const
nuclear@1 29 {
nuclear@1 30 return atten;
nuclear@1 31 }
nuclear@12 32
nuclear@12 33 void Light::draw() const
nuclear@12 34 {
nuclear@12 35 }
nuclear@12 36
nuclear@12 37 bool Light::intersect(const Ray &ray, float *dist)
nuclear@12 38 {
nuclear@12 39 return false;
nuclear@12 40 }