/*********************************************************** CSC418, SPRING 2005 light_source.h author: Jack Wang light source classes ***********************************************************/ #include "util.h" // Base class for a light source. You could define different types // of lights here, but point light is sufficient for most scenes you // might want to render. Different light sources shade the ray // differently. class LightSource { public: virtual void shade( Ray3D& ) = 0; }; // A point light is defined by its position in world space and its // colour. class PointLight : public LightSource { public: PointLight( Point3D pos, Colour col ) : _pos(pos), _col(col) {} void shade( Ray3D& ray ); private: Point3D _pos; Colour _col; };