#include <specularreflection.h>
Public Member Functions | |
SpecularReflection (const SWCSpectrum &r, Fresnel *fr, float flm, float flmindex) | |
virtual | ~SpecularReflection () |
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 |
Private Attributes | |
SWCSpectrum | R |
Fresnel * | fresnel |
float | film |
float | filmindex |
Definition at line 33 of file specularreflection.h.
lux::SpecularReflection::SpecularReflection | ( | const SWCSpectrum & | r, | |
Fresnel * | fr, | |||
float | flm, | |||
float | flmindex | |||
) | [inline] |
Definition at line 36 of file specularreflection.h.
virtual lux::SpecularReflection::~SpecularReflection | ( | ) | [inline, virtual] |
Definition at line 40 of file specularreflection.h.
virtual void lux::SpecularReflection::f | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
const Vector & | wi, | |||
SWCSpectrum *const | f | |||
) | const [inline, virtual] |
Evaluates the BxDF. Accumulates the result in the f parameter.
Implements lux::BxDF.
Definition at line 41 of file specularreflection.h.
Referenced by Sample_f().
virtual float lux::SpecularReflection::Pdf | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
const Vector & | wi | |||
) | const [inline, virtual] |
Reimplemented from lux::BxDF.
Definition at line 47 of file specularreflection.h.
bool SpecularReflection::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.
Reimplemented in lux::ArchitecturalReflection.
Definition at line 42 of file specularreflection.cpp.
References lux::CosTheta(), lux::Fresnel::Evaluate(), f(), film, filmindex, fresnel, PhaseDifference(), R, lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Reimplemented from lux::BxDF.
Reimplemented in lux::ArchitecturalReflection.
Definition at line 55 of file specularreflection.cpp.
References lux::CosTheta(), lux::Fresnel::Evaluate(), lux::SWCSpectrum::Filter(), and fresnel.
float lux::SpecularReflection::film [private] |
Definition at line 54 of file specularreflection.h.
Referenced by Sample_f().
float lux::SpecularReflection::filmindex [private] |
Definition at line 54 of file specularreflection.h.
Referenced by Sample_f().
Fresnel* lux::SpecularReflection::fresnel [private] |
Definition at line 53 of file specularreflection.h.
Referenced by Sample_f(), and Weight().
SWCSpectrum lux::SpecularReflection::R [private] |
Definition at line 52 of file specularreflection.h.
Referenced by Sample_f().