rayzor

view src/light.h @ 20:6b11a3f8706e

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 15 Apr 2014 01:36:03 +0300
parents 79609d482762
children
line source
1 #ifndef LIGHT_H_
2 #define LIGHT_H_
4 #include "vmath.h"
5 #include "snode.h"
7 class Light : public SceneNode {
8 private:
9 float intens;
10 Vector3 color;
11 Vector3 atten;
13 public:
14 Light();
16 void set_intensity(float val);
17 float get_intensity() const;
19 void set_color(const Vector3 &color);
20 const Vector3 &get_color() const;
22 // includes attenuation and intensity
23 Vector3 get_color(const Vector3 &pt) const;
25 void set_attenuation(const Vector3 &atten);
26 const Vector3 &get_attenuation() const;
28 float calc_attenuation(float d) const;
30 void draw(bool emph = false) const;
32 bool intersect(const Ray &ray, RayHit *hit = 0) const;
33 };
35 #endif // LIGHT_H_