goat3dgfx
annotate src/light.h @ 30:07c08d970cb4
added a rudimentary light class
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 02 Mar 2014 03:56:47 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@30 | 1 #ifndef GOATGFX_LIGHT_H_ |
nuclear@30 | 2 #define GOATGFX_LIGHT_H_ |
nuclear@30 | 3 |
nuclear@30 | 4 #include "xform_node.h" |
nuclear@30 | 5 |
nuclear@30 | 6 namespace goatgfx { |
nuclear@30 | 7 |
nuclear@30 | 8 class Light : public XFormNode { |
nuclear@30 | 9 private: |
nuclear@30 | 10 Vector3 color; |
nuclear@30 | 11 Vector3 attenuation; |
nuclear@30 | 12 |
nuclear@30 | 13 bool cast_shadows; |
nuclear@30 | 14 |
nuclear@30 | 15 public: |
nuclear@30 | 16 Light(); |
nuclear@30 | 17 |
nuclear@30 | 18 void set_color(const Vector3 &color); |
nuclear@30 | 19 const Vector3 &get_color() const; |
nuclear@30 | 20 |
nuclear@30 | 21 void set_attenuation(const Vector3 &att); |
nuclear@30 | 22 const Vector3 &get_attenuation() const; |
nuclear@30 | 23 |
nuclear@30 | 24 void set_shadow_caster(bool s); |
nuclear@30 | 25 bool is_shadow_caster() const; |
nuclear@30 | 26 }; |
nuclear@30 | 27 |
nuclear@30 | 28 } // namespace goatgfx |
nuclear@30 | 29 |
nuclear@30 | 30 #endif // GOATGFX_LIGHT_H_ |