src/rcrt/lights/SphericalLight.h

Go to the documentation of this file.
00001 #ifndef SPHERICALLIGHT_H_
00002 #define SPHERICALLIGHT_H_
00003 
00004 #include "Light.h"
00005 
00006 namespace rcrt
00007 {
00008 
00009 class SphericalLight : public rcrt::Light
00010 {
00011 private:
00012         float radius;
00013         Point3D center;
00014         
00015         //precomputed
00016         float radius2;
00017         
00018 public:
00019         SphericalLight(const RGBColor& power, const float& radius, const Point3D& center, const int& samples = 4);
00020         virtual ~SphericalLight();
00021         
00022 
00023         virtual LightSample illuminate(const Point3D& p, const Vec3D& no) const;
00024         virtual void illuminate(const Point3D& p, const Vec3D& no, std::vector<LightSample>& samples,
00025                         const int& noSamples, Scene* s = 0) const;
00026         virtual RGBColor getEmitted(const Vec3D& dir, const Point3D& pos) const;
00027         
00028         virtual void emitPhoton(Photon* photon) const;
00029 };
00030 
00031 }
00032 
00033 #endif /*SPHERICALLIGHT_H_*/

Generated on Thu Jan 31 19:26:19 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3