#include <cooktorrance.h>
Public Member Functions | |
| CookTorrance (const SWCSpectrum &kd, u_int nl, const SWCSpectrum *ks, MicrofacetDistribution **dist, Fresnel **fres) | |
| SWCSpectrum | f (const Vector &wo, const Vector &wi) const |
| float | G (const Vector &wo, const Vector &wi, const Vector &wh) const |
| SWCSpectrum | Sample_f (const Vector &wi, Vector *sampled_f, float u1, float u2, float *pdf, float *pdfBack=NULL) const |
| float | Pdf (const Vector &wi, const Vector &wo) const |
Private Attributes | |
| SWCSpectrum | KD |
| u_int | nLobes |
| const SWCSpectrum * | KS |
| MicrofacetDistribution ** | distribution |
| Fresnel ** | fresnel |
Definition at line 34 of file cooktorrance.h.
| CookTorrance::CookTorrance | ( | const SWCSpectrum & | kd, | |
| u_int | nl, | |||
| const SWCSpectrum * | ks, | |||
| MicrofacetDistribution ** | dist, | |||
| Fresnel ** | fres | |||
| ) |
Definition at line 35 of file cooktorrance.cpp.
References distribution, fresnel, KD, KS, and nLobes.
| SWCSpectrum CookTorrance::f | ( | const Vector & | wo, | |
| const Vector & | wi | |||
| ) | const [virtual] |
Implements lux::BxDF.
Definition at line 45 of file cooktorrance.cpp.
References lux::CosTheta(), lux::MicrofacetDistribution::D(), distribution, lux::Dot(), lux::Fresnel::Evaluate(), fresnel, G(), INV_PI, KD, KS, M_PI, nLobes, and lux::Normalize().
Referenced by G(), and Sample_f().
Definition at line 62 of file cooktorrance.cpp.
References lux::AbsDot(), lux::CosTheta(), f(), and cimg_library::cimg::min().
Referenced by f().
Reimplemented from lux::BxDF.
Definition at line 96 of file cooktorrance.cpp.
References distribution, INV_PI, nLobes, lux::MicrofacetDistribution::Pdf(), lux::SameHemisphere(), and lux::Vector::z.
Referenced by Sample_f().
| SWCSpectrum CookTorrance::Sample_f | ( | const Vector & | wi, | |
| Vector * | sampled_f, | |||
| float | u1, | |||
| float | u2, | |||
| float * | pdf, | |||
| float * | pdfBack = NULL | |||
| ) | const [virtual] |
Reimplemented from lux::BxDF.
Definition at line 70 of file cooktorrance.cpp.
References lux::CosineSampleHemisphere(), distribution, f(), nLobes, Pdf(), lux::MicrofacetDistribution::Sample_f(), lux::random::uintValue(), and lux::Vector::z.
Definition at line 48 of file cooktorrance.h.
Referenced by CookTorrance(), f(), Pdf(), and Sample_f().
Fresnel** lux::CookTorrance::fresnel [private] |
Definition at line 49 of file cooktorrance.h.
Referenced by CookTorrance(), and f().
SWCSpectrum lux::CookTorrance::KD [private] |
Definition at line 45 of file cooktorrance.h.
Referenced by CookTorrance(), and f().
const SWCSpectrum* lux::CookTorrance::KS [private] |
Definition at line 47 of file cooktorrance.h.
Referenced by CookTorrance(), and f().
u_int lux::CookTorrance::nLobes [private] |
Definition at line 46 of file cooktorrance.h.
Referenced by CookTorrance(), f(), Pdf(), and Sample_f().
1.6.1