00001 #ifndef LIGHTMATERIAL_H_ 00002 #define LIGHTMATERIAL_H_ 00003 00004 #include "Material.h" 00005 #include "../lights/Light.h" 00006 00007 namespace rcrt 00008 { 00009 00010 class LightMaterial : public rcrt::Material 00011 { 00012 private: 00013 Light* light; 00014 00015 public: 00016 LightMaterial(Light* l); 00017 virtual ~LightMaterial(); 00018 00019 virtual bool hasDiffuse() const; 00020 virtual bool hasSpecular() const; 00021 virtual bool hasTransmissive() const; 00022 virtual RGBColor getEmitted(const Vec3D& wOut, Intersection& is); 00023 virtual RGBColor sample(const Vec3D& wOut, const Vec3D& wInc, Intersection& is); 00024 virtual RGBColor sampleDiffuse(const Vec3D& wOut, const Vec3D& wInc, Intersection& is); 00025 virtual RGBColor sampleSpecular(const Vec3D& wOut, const Vec3D& wInc, Intersection& is); 00026 virtual ScatterEvent scatterPhoton(Intersection& is, Photon* photon); 00027 virtual bool refracts() const; 00028 }; 00029 00030 } 00031 00032 #endif /*LIGHTMATERIAL_H_*/