00001 #ifndef BSDFMATERIAL_H_
00002 #define BSDFMATERIAL_H_
00003
00004 #include "Material.h"
00005 #include "../bxdf/BSDF.h"
00006
00007 namespace rcrt
00008 {
00009
00010 class BSDFMaterial : public rcrt::Material
00011 {
00012 private:
00013 BSDF bsdf;
00014
00015 public:
00016 BSDFMaterial(BSDF b, const std::complex<float>& ior = std::complex<float>(1,0));
00017 virtual ~BSDFMaterial();
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