#include <bxdf.h>
Public Member Functions | |
BRDFToBTDF (BxDF *b, float ei=1.f, float et=1.f, float c=0.f) | |
virtual | ~BRDFToBTDF () |
virtual SWCSpectrum | rho (const TsPack *tspack, const Vector &w, int nSamples, float *samples) const |
virtual SWCSpectrum | rho (const TsPack *tspack, int nSamples, float *samples) const |
virtual void | f (const TsPack *tspack, const Vector &wo, const Vector &wi, SWCSpectrum *const f) const |
virtual bool | Sample_f (const TsPack *tspack, const Vector &wo, Vector *wi, float u1, float u2, SWCSpectrum *const f, float *pdf, float *pdfBack=NULL, bool reverse=false) const |
virtual float | Weight (const TsPack *tspack, const Vector &wo) const |
virtual float | Pdf (const TsPack *tspack, const Vector &wo, const Vector &wi) const |
Static Public Member Functions | |
static Vector | otherHemisphere (const Vector &w) |
Private Attributes | |
float | etai |
float | etat |
float | cb |
BxDF * | brdf |
Definition at line 266 of file bxdf.h.
lux::BRDFToBTDF::BRDFToBTDF | ( | BxDF * | b, | |
float | ei = 1.f , |
|||
float | et = 1.f , |
|||
float | c = 0.f | |||
) | [inline] |
void BRDFToBTDF::f | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
const Vector & | wi, | |||
SWCSpectrum *const | f | |||
) | const [virtual] |
Evaluates the BxDF. Accumulates the result in the f parameter.
Implements lux::BxDF.
Definition at line 33 of file bxdf.cpp.
References brdf, cb, lux::CosTheta(), lux::Dot(), etai, etat, lux::BxDF::f(), lux::Normalize(), otherHemisphere(), lux::SpectrumWavelengths::SampleSingle(), cimg_library::cimg::swap(), lux::TsPack::swl, and lux::Vector::z.
Referenced by Pdf(), and Sample_f().
Definition at line 274 of file bxdf.h.
References lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Referenced by f(), Pdf(), rho(), and Sample_f().
float BRDFToBTDF::Pdf | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
const Vector & | wi | |||
) | const [virtual] |
Reimplemented from lux::BxDF.
Definition at line 144 of file bxdf.cpp.
References brdf, cb, lux::CosTheta(), lux::Dot(), etai, etat, f(), lux::Normalize(), otherHemisphere(), lux::BxDF::Pdf(), lux::SpectrumWavelengths::SampleSingle(), cimg_library::cimg::swap(), lux::TsPack::swl, and lux::Vector::z.
virtual SWCSpectrum lux::BRDFToBTDF::rho | ( | const TsPack * | tspack, | |
int | nSamples, | |||
float * | samples | |||
) | const [inline, virtual] |
Reimplemented from lux::BxDF.
Definition at line 281 of file bxdf.h.
References brdf, and lux::BxDF::rho().
virtual SWCSpectrum lux::BRDFToBTDF::rho | ( | const TsPack * | tspack, | |
const Vector & | w, | |||
int | nSamples, | |||
float * | samples | |||
) | const [inline, virtual] |
Reimplemented from lux::BxDF.
Definition at line 277 of file bxdf.h.
References brdf, otherHemisphere(), and lux::BxDF::rho().
bool BRDFToBTDF::Sample_f | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
Vector * | wi, | |||
float | u1, | |||
float | u2, | |||
SWCSpectrum *const | f, | |||
float * | pdf, | |||
float * | pdfBack = NULL , |
|||
bool | reverse = false | |||
) | const [virtual] |
Samples the BxDF. Returns the result of the BxDF for the sampled direction in f.
Reimplemented from lux::BxDF.
Definition at line 66 of file bxdf.cpp.
References brdf, cb, lux::Dot(), etai, etat, f(), cimg_library::cimg::max(), lux::Normalize(), otherHemisphere(), lux::BxDF::Sample_f(), lux::SpectrumWavelengths::SampleSingle(), cimg_library::cimg::swap(), lux::TsPack::swl, and lux::Vector::z.
virtual float lux::BRDFToBTDF::Weight | ( | const TsPack * | tspack, | |
const Vector & | wo | |||
) | const [inline, virtual] |
Reimplemented from lux::BxDF.
Definition at line 288 of file bxdf.h.
References brdf, and lux::BxDF::Weight().
BxDF* lux::BRDFToBTDF::brdf [private] |
float lux::BRDFToBTDF::cb [private] |
Definition at line 293 of file bxdf.h.
Referenced by f(), Pdf(), and Sample_f().
float lux::BRDFToBTDF::etai [private] |
Definition at line 293 of file bxdf.h.
Referenced by f(), Pdf(), and Sample_f().
float lux::BRDFToBTDF::etat [private] |
Definition at line 293 of file bxdf.h.
Referenced by f(), Pdf(), and Sample_f().