00001 #ifndef COOKTORRANCE_H_
00002 #define COOKTORRANCE_H_
00003
00004 #include "BXDF.h"
00005 #include "fresnel.hpp"
00006
00007 namespace rcrt
00008 {
00009
00014 class CookTorrance : public rcrt::BXDF
00015 {
00016 private:
00017 std::complex<float> ior;
00018 float roughness;
00019
00020 public:
00027 CookTorrance(const RGBColor& diff, const RGBColor& spec, const float& rough, const std::complex<float>& indOR);
00028 virtual ~CookTorrance();
00029
00030 virtual RGBColor eval(const Vec3D& wOut, const Vec3D& wInc, const Vec3D& normal) const;
00031 virtual RGBColor evalDiffuse(const Vec3D& wOut, const Vec3D& wInc, const Vec3D& normal) const;
00032 virtual RGBColor evalSpecular(const Vec3D& wOut, const Vec3D& wInc, const Vec3D& normal) const;
00033 float pdf(const Vec3D& wOut, const Vec3D& wInc, const Vec3D& normal) const;
00034
00035 virtual bool specular() const;
00036 virtual bool glossy() const;
00037 virtual bool diffuse() const;
00038 virtual bool fresnel() const;
00039 };
00040
00041 }
00042
00043 #endif