rayzor
annotate 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 |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef LIGHT_H_ |
nuclear@1 | 2 #define LIGHT_H_ |
nuclear@1 | 3 |
nuclear@1 | 4 #include "vmath.h" |
nuclear@13 | 5 #include "snode.h" |
nuclear@1 | 6 |
nuclear@12 | 7 class Light : public SceneNode { |
nuclear@1 | 8 private: |
nuclear@17 | 9 float intens; |
nuclear@1 | 10 Vector3 color; |
nuclear@1 | 11 Vector3 atten; |
nuclear@1 | 12 |
nuclear@1 | 13 public: |
nuclear@1 | 14 Light(); |
nuclear@1 | 15 |
nuclear@17 | 16 void set_intensity(float val); |
nuclear@17 | 17 float get_intensity() const; |
nuclear@17 | 18 |
nuclear@1 | 19 void set_color(const Vector3 &color); |
nuclear@1 | 20 const Vector3 &get_color() const; |
nuclear@1 | 21 |
nuclear@17 | 22 // includes attenuation and intensity |
nuclear@17 | 23 Vector3 get_color(const Vector3 &pt) const; |
nuclear@17 | 24 |
nuclear@1 | 25 void set_attenuation(const Vector3 &atten); |
nuclear@1 | 26 const Vector3 &get_attenuation() const; |
nuclear@12 | 27 |
nuclear@17 | 28 float calc_attenuation(float d) const; |
nuclear@17 | 29 |
nuclear@18 | 30 void draw(bool emph = false) const; |
nuclear@12 | 31 |
nuclear@17 | 32 bool intersect(const Ray &ray, RayHit *hit = 0) const; |
nuclear@1 | 33 }; |
nuclear@1 | 34 |
nuclear@1 | 35 #endif // LIGHT_H_ |