#include <CookTorrance.h>
Public Member Functions | |
CookTorrance (const RGBColor &diff, const RGBColor &spec, const float &rough, const std::complex< float > &indOR) | |
virtual | ~CookTorrance () |
virtual RGBColor | eval (const Vec3D &wOut, const Vec3D &wInc, const Vec3D &normal) const |
virtual RGBColor | evalDiffuse (const Vec3D &wOut, const Vec3D &wInc, const Vec3D &normal) const |
virtual RGBColor | evalSpecular (const Vec3D &wOut, const Vec3D &wInc, const Vec3D &normal) const |
float | pdf (const Vec3D &wOut, const Vec3D &wInc, const Vec3D &normal) const |
virtual bool | specular () const |
virtual bool | glossy () const |
virtual bool | diffuse () const |
virtual bool | fresnel () const |
Private Attributes | |
std::complex< float > | ior |
float | roughness |
Definition at line 14 of file CookTorrance.h.
rcrt::CookTorrance::CookTorrance | ( | const RGBColor & | diff, | |
const RGBColor & | spec, | |||
const float & | rough, | |||
const std::complex< float > & | indOR | |||
) |
diff | Diffuse coefficient | |
spec | Specular coefficient | |
rough | A roughness value, describes the distribution of microfacets | |
indOR | the index of refraction |
Definition at line 10 of file CookTorrance.cpp.
rcrt::CookTorrance::~CookTorrance | ( | ) | [virtual] |
Definition at line 16 of file CookTorrance.cpp.
RGBColor rcrt::CookTorrance::eval | ( | const Vec3D & | wOut, | |
const Vec3D & | wInc, | |||
const Vec3D & | normal | |||
) | const [virtual] |
Implements rcrt::BXDF.
Definition at line 20 of file CookTorrance.cpp.
References evalSpecular(), and rcrt::BXDF::kd.
RGBColor rcrt::CookTorrance::evalSpecular | ( | const Vec3D & | wOut, | |
const Vec3D & | wInc, | |||
const Vec3D & | normal | |||
) | const [virtual] |
Implements rcrt::BXDF.
Definition at line 30 of file CookTorrance.cpp.
References rcrt::fresnelTerm(), ior, rcrt::BXDF::ks, roughness, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().
Referenced by eval().
bool rcrt::CookTorrance::specular | ( | ) | const [virtual] |
bool rcrt::CookTorrance::glossy | ( | ) | const [virtual] |
bool rcrt::CookTorrance::diffuse | ( | ) | const [virtual] |
bool rcrt::CookTorrance::fresnel | ( | ) | const [virtual] |
std::complex<float> rcrt::CookTorrance::ior [private] |
float rcrt::CookTorrance::roughness [private] |