#include <bxdf.h>
Public Member Functions | |
BSDF (const DifferentialGeometry &dgs, const Normal &ngeom, float eta=1.f) | |
virtual int | NumComponents () const =0 |
virtual int | NumComponents (BxDFType flags) const =0 |
virtual void | SetCompositingParams (CompositingParams *cp) |
bool | HasShadingGeometry () const |
Vector | WorldToLocal (const Vector &v) const |
Vector | LocalToWorld (const Vector &v) const |
virtual bool | Sample_f (const TsPack *tspack, const Vector &o, Vector *wi, float u1, float u2, float u3, SWCSpectrum *const f, float *pdf, BxDFType flags=BSDF_ALL, BxDFType *sampledType=NULL, float *pdfBack=NULL, bool reverse=false) const =0 |
virtual float | Pdf (const TsPack *tspack, const Vector &wo, const Vector &wi, BxDFType flags=BSDF_ALL) const =0 |
virtual SWCSpectrum | f (const TsPack *tspack, const Vector &woW, const Vector &wiW, BxDFType flags=BSDF_ALL) const =0 |
virtual SWCSpectrum | rho (const TsPack *tspack, BxDFType flags=BSDF_ALL) const =0 |
virtual SWCSpectrum | rho (const TsPack *tspack, const Vector &wo, BxDFType flags=BSDF_ALL) const =0 |
Static Public Member Functions | |
static void * | Alloc (const TsPack *tspack, u_int sz) |
static void | FreeAll (const TsPack *tspack) |
Public Attributes | |
const DifferentialGeometry | dgShading |
const float | eta |
Normal | nn |
Normal | ng |
CompositingParams * | compParams |
Protected Member Functions | |
virtual | ~BSDF () |
Protected Attributes | |
Vector | sn |
Vector | tn |
Definition at line 69 of file bxdf.h.
BSDF::BSDF | ( | const DifferentialGeometry & | dgs, | |
const Normal & | ngeom, | |||
float | eta = 1.f | |||
) |
Definition at line 212 of file bxdf.cpp.
References compParams, lux::Cross(), dgShading, lux::DifferentialGeometry::dpdu, ng, lux::DifferentialGeometry::nn, nn, lux::Normalize(), sn, and tn.
Definition at line 107 of file bxdf.h.
References MemoryArena::Alloc(), and lux::TsPack::arena.
Referenced by lux::CarPaint::GetBSDF().
virtual SWCSpectrum lux::BSDF::f | ( | const TsPack * | tspack, | |
const Vector & | woW, | |||
const Vector & | wiW, | |||
BxDFType | flags = BSDF_ALL | |||
) | const [pure virtual] |
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
Referenced by lux::BidirIntegrator::evalPath(), evalPath(), lux::SunLight::Le(), lux::Intersection::Le(), lux::WhittedIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::BidirIntegrator::Li(), lux::PhotonIntegrator::LPhoton(), lux::LightPhotonMap::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::MixBSDF::Sample_f(), and lux::VisibilityTester::TestOcclusion().
static void lux::BSDF::FreeAll | ( | const TsPack * | tspack | ) | [inline, static] |
Definition at line 110 of file bxdf.h.
References lux::TsPack::arena, and MemoryArena::FreeAll().
Referenced by lux::RenderThread::render().
bool lux::BSDF::HasShadingGeometry | ( | ) | const [inline] |
Definition at line 79 of file bxdf.h.
References ng, nn, lux::Normal::x, lux::Normal::y, and lux::Normal::z.
Definition at line 85 of file bxdf.h.
References nn, sn, tn, lux::Normal::x, lux::Vector::x, lux::Normal::y, lux::Vector::y, lux::Normal::z, and lux::Vector::z.
Referenced by lux::IrradianceCache::IndirectLo(), lux::MultiBSDF::Sample_f(), and lux::SingleBSDF::Sample_f().
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
virtual int lux::BSDF::NumComponents | ( | ) | const [pure virtual] |
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
Referenced by lux::IrradianceCache::IndirectLo(), lux::LightPhotonMap::LDiffusePhoton(), lux::ExPhotonIntegrator::Li(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::LPhoton(), lux::LightPhotonMap::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::LightPhotonMap::LPhotonDiffuseApprox(), lux::PhotonIntegrator::Preprocess(), and lux::ExPhotonIntegrator::Preprocess().
virtual float lux::BSDF::Pdf | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
const Vector & | wi, | |||
BxDFType | flags = BSDF_ALL | |||
) | const [pure virtual] |
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
Referenced by evalPath(), generateEyePath(), generateLightPath(), lux::PathIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::MixBSDF::Sample_f(), and lux::VisibilityTester::TestOcclusion().
virtual SWCSpectrum lux::BSDF::rho | ( | const TsPack * | tspack, | |
const Vector & | wo, | |||
BxDFType | flags = BSDF_ALL | |||
) | const [pure virtual] |
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
virtual SWCSpectrum lux::BSDF::rho | ( | const TsPack * | tspack, | |
BxDFType | flags = BSDF_ALL | |||
) | const [pure virtual] |
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
Referenced by lux::IrradianceCache::IndirectLo(), lux::LightPhotonMap::LDiffusePhoton(), lux::PhotonIntegrator::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::LightPhotonMap::LPhotonDiffuseApprox(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and lux::MixBSDF::rho().
virtual bool lux::BSDF::Sample_f | ( | const TsPack * | tspack, | |
const Vector & | o, | |||
Vector * | wi, | |||
float | u1, | |||
float | u2, | |||
float | u3, | |||
SWCSpectrum *const | f, | |||
float * | pdf, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL , |
|||
float * | pdfBack = NULL , |
|||
bool | reverse = false | |||
) | const [pure virtual] |
Samples the BSDF. Returns the result of the BSDF for the sampled direction in f.
Implemented in lux::SingleBSDF, lux::MultiBSDF, and lux::MixBSDF.
Referenced by generateEyePath(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::IrradianceCache::IndirectLo(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), and lux::ExPhotonIntegrator::Preprocess().
virtual void lux::BSDF::SetCompositingParams | ( | CompositingParams * | cp | ) | [inline, virtual] |
Reimplemented in lux::MixBSDF.
Definition at line 76 of file bxdf.h.
References compParams.
Referenced by lux::ShinyMetal::GetBSDF(), lux::RoughGlass::GetBSDF(), lux::Null::GetBSDF(), lux::Mirror::GetBSDF(), lux::Metal::GetBSDF(), lux::MatteTranslucent::GetBSDF(), lux::Matte::GetBSDF(), lux::Glossy::GetBSDF(), lux::Glass::GetBSDF(), and lux::CarPaint::GetBSDF().
Definition at line 82 of file bxdf.h.
References lux::Dot(), nn, sn, and tn.
Referenced by lux::MultiBSDF::f(), lux::SingleBSDF::f(), lux::MultiBSDF::Pdf(), lux::SingleBSDF::Pdf(), lux::MultiBSDF::rho(), lux::SingleBSDF::rho(), lux::MultiBSDF::Sample_f(), and lux::SingleBSDF::Sample_f().
Definition at line 118 of file bxdf.h.
Referenced by BSDF(), lux::DistributedPath::LiInternal(), lux::MixBSDF::SetCompositingParams(), and SetCompositingParams().
Definition at line 113 of file bxdf.h.
Referenced by BSDF(), generateEyePath(), generateLightPath(), lux::BidirIntegrator::generatePath(), getDirectLight(), lux::IrradianceCache::IndirectLo(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::DebugIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and lux::VisibilityTester::TestOcclusion().
const float lux::BSDF::eta |
Definition at line 114 of file bxdf.h.
Referenced by lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), and lux::DirectLightingIntegrator::LiInternal().
Definition at line 115 of file bxdf.h.
Referenced by BSDF(), lux::MultiBSDF::f(), lux::SingleBSDF::f(), HasShadingGeometry(), lux::MultiBSDF::Sample_f(), and lux::SingleBSDF::Sample_f().
Definition at line 115 of file bxdf.h.
Referenced by BSDF(), lux::MixBSDF::f(), HasShadingGeometry(), LocalToWorld(), lux::MixBSDF::Sample_f(), and WorldToLocal().
Vector lux::BSDF::sn [protected] |
Definition at line 124 of file bxdf.h.
Referenced by BSDF(), LocalToWorld(), and WorldToLocal().
Vector lux::BSDF::tn [protected] |
Definition at line 124 of file bxdf.h.
Referenced by BSDF(), LocalToWorld(), and WorldToLocal().