src/rcrt/lights/Light.h

Go to the documentation of this file.
00001 #ifndef LIGHT_H_
00002 #define LIGHT_H_
00003 
00004 #include "../RGBColor.h"
00005 #include "../math/rcrtmath.h"
00006 #include "../Scene.h"
00007 #include "LightSample.h"
00008 #include "sampling/LightSampler.h"
00009 #include "../gi/Photon.h"
00010 
00011 namespace rcrt
00012 {
00013 
00017 class Light
00018 {
00019 protected:
00020         RGBColor power;
00021         int minSamples;
00022         
00026         LightSampler* sampler;
00027         
00028 public:
00029         Light(const RGBColor& p=RGBColor(0), const int& minS=1);
00030         virtual ~Light();
00031         virtual const RGBColor& getPower() const;
00032         virtual void setPower(const RGBColor& pow);
00033 
00039         virtual LightSample illuminate(const Point3D& p, const Vec3D& no) const =0;
00040         
00048         virtual void illuminate(const Point3D& p, const Vec3D& no, std::vector<LightSample>& samples,
00049                         const int& noSamples, Scene* s = 0) const =0;
00050         
00056         virtual RGBColor getEmitted(const Vec3D& dir, const Point3D& pos) const =0;
00057         
00061         virtual void setSampler(LightSampler* ls);
00062         virtual LightSampler* getSampler() const;
00063         virtual bool hasSampler() const;
00064         
00068         const int& getMinSamples() const;
00069         
00073         virtual Object* getObject();
00074         
00078         virtual void emitPhoton(Photon* photon) const =0;
00079 };
00080 
00081 }
00082 
00083 #endif /*LIGHT_H_*/

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