rcrt::CookTorrance Class Reference

#include <CookTorrance.h>

Inheritance diagram for rcrt::CookTorrance:

Inheritance graph
[legend]
Collaboration diagram for rcrt::CookTorrance:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

An implementation of the Cook Torrance BRDF. We use RGB-specific diffuse and specular coefficients.

Definition at line 14 of file CookTorrance.h.


Constructor & Destructor Documentation

rcrt::CookTorrance::CookTorrance ( const RGBColor diff,
const RGBColor spec,
const float &  rough,
const std::complex< float > &  indOR 
)

Parameters:
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.


Member Function Documentation

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::evalDiffuse ( const Vec3D wOut,
const Vec3D wInc,
const Vec3D normal 
) const [virtual]

Implements rcrt::BXDF.

Definition at line 25 of file CookTorrance.cpp.

References 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().

float rcrt::CookTorrance::pdf ( const Vec3D wOut,
const Vec3D wInc,
const Vec3D normal 
) const

Definition at line 98 of file CookTorrance.cpp.

References roughness.

bool rcrt::CookTorrance::specular (  )  const [virtual]

Implements rcrt::BXDF.

Definition at line 78 of file CookTorrance.cpp.

bool rcrt::CookTorrance::glossy (  )  const [virtual]

Implements rcrt::BXDF.

Definition at line 83 of file CookTorrance.cpp.

bool rcrt::CookTorrance::diffuse (  )  const [virtual]

Implements rcrt::BXDF.

Definition at line 88 of file CookTorrance.cpp.

bool rcrt::CookTorrance::fresnel (  )  const [virtual]

Implements rcrt::BXDF.

Definition at line 93 of file CookTorrance.cpp.


Member Data Documentation

std::complex<float> rcrt::CookTorrance::ior [private]

Definition at line 17 of file CookTorrance.h.

Referenced by evalSpecular().

float rcrt::CookTorrance::roughness [private]

Definition at line 18 of file CookTorrance.h.

Referenced by evalSpecular(), and pdf().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:20 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3