#include <bxdf.h>
Public Member Functions | |
SWCSpectrum | Sample_f (const Vector &o, Vector *wi, float u1, float u2, float u3, float *pdf, BxDFType flags=BSDF_ALL, BxDFType *sampledType=NULL, float *pdfBack=NULL) const |
SWCSpectrum | Sample_f (const Vector &wo, Vector *wi, BxDFType flags=BSDF_ALL, BxDFType *sampledType=NULL) const |
float | Pdf (const Vector &wo, const Vector &wi, BxDFType flags=BSDF_ALL) const |
BSDF (const DifferentialGeometry &dgs, const Normal &ngeom, float eta=1.f) | |
void | Add (BxDF *bxdf) |
int | NumComponents () const |
int | NumComponents (BxDFType flags) const |
bool | HasShadingGeometry () const |
Vector | WorldToLocal (const Vector &v) const |
Vector | LocalToWorld (const Vector &v) const |
SWCSpectrum | f (const Vector &woW, const Vector &wiW, BxDFType flags=BSDF_ALL) const |
SWCSpectrum | rho (BxDFType flags=BSDF_ALL) const |
SWCSpectrum | rho (const Vector &wo, BxDFType flags=BSDF_ALL) const |
Static Public Member Functions | |
static void * | Alloc (u_int sz) |
static void | FreeAll () |
Public Attributes | |
const DifferentialGeometry | dgShading |
const float | eta |
Private Member Functions | |
~BSDF () | |
Private Attributes | |
Normal | nn |
Normal | ng |
Vector | sn |
Vector | tn |
int | nBxDFs |
BxDF * | bxdfs [MAX_BxDFS] |
Static Private Attributes | |
static boost::thread_specific_ptr < MemoryArena > | arena |
Friends | |
class | RenderThread |
class | Scene |
class | NoSuchClass |
Definition at line 70 of file bxdf.h.
BSDF::BSDF | ( | const DifferentialGeometry & | dgs, | |
const Normal & | ngeom, | |||
float | eta = 1.f | |||
) |
Definition at line 187 of file bxdf.cpp.
References lux::Cross(), dgShading, lux::DifferentialGeometry::dpdu, nBxDFs, ng, lux::DifferentialGeometry::nn, nn, lux::Normalize(), sn, and tn.
void lux::BSDF::Add | ( | BxDF * | bxdf | ) | [inline] |
Definition at line 176 of file bxdf.h.
References bxdfs, MAX_BxDFS, and nBxDFs.
Referenced by lux::UberMaterial::GetBSDF(), lux::Translucent::GetBSDF(), lux::Substrate::GetBSDF(), lux::Skin::GetBSDF(), lux::ShinyMetal::GetBSDF(), lux::RoughGlass::GetBSDF(), lux::Primer::GetBSDF(), lux::Plastic::GetBSDF(), lux::Null::GetBSDF(), lux::Mirror::GetBSDF(), lux::Metal::GetBSDF(), lux::MatteTranslucent::GetBSDF(), lux::Matte::GetBSDF(), lux::Glass::GetBSDF(), lux::Felt::GetBSDF(), lux::Clay::GetBSDF(), lux::CarPaint::GetBSDF(), lux::BrushedMetal::GetBSDF(), and lux::BluePaint::GetBSDF().
static void* lux::BSDF::Alloc | ( | u_int | sz | ) | [inline, static] |
SWCSpectrum BSDF::f | ( | const Vector & | woW, | |
const Vector & | wiW, | |||
BxDFType | flags = BSDF_ALL | |||
) | const |
Definition at line 196 of file bxdf.cpp.
References lux::BSDF_REFLECTION, lux::BSDF_TRANSMISSION, bxdfs, lux::Dot(), lux::BxDF::f(), nBxDFs, ng, and WorldToLocal().
Referenced by lux::EstimateDirect(), lux::BidirIntegrator::evalPath(), lux::SunLight::Le(), lux::Intersection::Le(), lux::WhittedIntegrator::Li(), lux::Path2Integrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::PhotonIntegrator::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), Sample_f(), and lux::VisibilityTester::TestOcclusion().
static void lux::BSDF::FreeAll | ( | ) | [inline, static] |
Definition at line 105 of file bxdf.h.
References arena.
Referenced by lux::ExPhotonIntegrator::Preprocess(), and lux::RenderThread::render().
bool lux::BSDF::HasShadingGeometry | ( | ) | const [inline] |
Definition at line 88 of file bxdf.h.
References ng, nn, lux::Normal::x, lux::Normal::y, and lux::Normal::z.
Definition at line 94 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(), and Sample_f().
int lux::BSDF::NumComponents | ( | BxDFType | flags | ) | const [inline] |
int lux::BSDF::NumComponents | ( | ) | const [inline] |
Definition at line 86 of file bxdf.h.
References nBxDFs.
Referenced by lux::IrradianceCache::IndirectLo(), lux::ExPhotonIntegrator::LiInternal(), lux::PhotonIntegrator::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::PhotonIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and Sample_f().
Definition at line 174 of file bxdf.cpp.
References bxdfs, nBxDFs, lux::BxDF::Pdf(), and WorldToLocal().
Referenced by lux::EstimateDirect(), lux::Path2Integrator::Li(), lux::ExPhotonIntegrator::LiInternal(), and lux::VisibilityTester::TestOcclusion().
SWCSpectrum BSDF::rho | ( | const Vector & | wo, | |
BxDFType | flags = BSDF_ALL | |||
) | const |
SWCSpectrum BSDF::rho | ( | BxDFType | flags = BSDF_ALL |
) | const |
Definition at line 211 of file bxdf.cpp.
References bxdfs, nBxDFs, and lux::BxDF::rho().
Referenced by lux::IrradianceCache::IndirectLo(), lux::PhotonIntegrator::LPhoton(), lux::ExPhotonIntegrator::LPhoton(), lux::IGIIntegrator::Preprocess(), and lux::ExPhotonIntegrator::Preprocess().
SWCSpectrum BSDF::Sample_f | ( | const Vector & | wo, | |
Vector * | wi, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL | |||
) | const |
Definition at line 103 of file bxdf.cpp.
References lux::SWCSpectrum::Black(), f(), lux::random::floatValue(), and Sample_f().
SWCSpectrum BSDF::Sample_f | ( | const Vector & | o, | |
Vector * | wi, | |||
float | u1, | |||
float | u2, | |||
float | u3, | |||
float * | pdf, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL , |
|||
float * | pdfBack = NULL | |||
) | const |
Definition at line 111 of file bxdf.cpp.
References lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, bxdfs, lux::Dot(), lux::BxDF::f(), f(), Floor2Int(), LocalToWorld(), cimg_library::cimg::min(), nBxDFs, ng, NumComponents(), lux::BxDF::Pdf(), lux::BxDF::Sample_f(), lux::BxDF::type, and WorldToLocal().
Referenced by lux::EstimateDirect(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::IrradianceCache::IndirectLo(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and Sample_f().
Definition at line 91 of file bxdf.h.
References lux::Dot(), nn, sn, and tn.
Referenced by f(), Pdf(), and Sample_f().
friend class RenderThread [friend] |
boost::thread_specific_ptr< MemoryArena > BSDF::arena [static, private] |
Definition at line 123 of file bxdf.h.
Referenced by Alloc(), FreeAll(), lux::Scene::Render(), and lux::RenderThread::render().
BxDF* lux::BSDF::bxdfs[MAX_BxDFS] [private] |
Definition at line 122 of file bxdf.h.
Referenced by Add(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
Definition at line 107 of file bxdf.h.
Referenced by BSDF(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::IrradianceCache::IndirectLo(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::DebugIntegrator::Li(), lux::BidirIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), 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 108 of file bxdf.h.
Referenced by lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), and lux::DirectLighting::LiInternal().
int lux::BSDF::nBxDFs [private] |
Definition at line 120 of file bxdf.h.
Referenced by Add(), BSDF(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
Normal lux::BSDF::ng [private] |
Definition at line 118 of file bxdf.h.
Referenced by BSDF(), f(), HasShadingGeometry(), and Sample_f().
Normal lux::BSDF::nn [private] |
Definition at line 118 of file bxdf.h.
Referenced by BSDF(), HasShadingGeometry(), LocalToWorld(), and WorldToLocal().
Vector lux::BSDF::sn [private] |
Vector lux::BSDF::tn [private] |