nuclear@1: #ifndef LIGHT_H_ nuclear@1: #define LIGHT_H_ nuclear@1: nuclear@1: #include "vmath.h" nuclear@13: #include "snode.h" nuclear@1: nuclear@12: class Light : public SceneNode { nuclear@1: private: nuclear@17: float intens; nuclear@1: Vector3 color; nuclear@1: Vector3 atten; nuclear@1: nuclear@1: public: nuclear@1: Light(); nuclear@1: nuclear@17: void set_intensity(float val); nuclear@17: float get_intensity() const; nuclear@17: nuclear@1: void set_color(const Vector3 &color); nuclear@1: const Vector3 &get_color() const; nuclear@1: nuclear@17: // includes attenuation and intensity nuclear@17: Vector3 get_color(const Vector3 &pt) const; nuclear@17: nuclear@1: void set_attenuation(const Vector3 &atten); nuclear@1: const Vector3 &get_attenuation() const; nuclear@12: nuclear@17: float calc_attenuation(float d) const; nuclear@17: nuclear@18: void draw(bool emph = false) const; nuclear@12: nuclear@17: bool intersect(const Ray &ray, RayHit *hit = 0) const; nuclear@1: }; nuclear@1: nuclear@1: #endif // LIGHT_H_