#include <reflection.h>
Public Member Functions | |
Spectrum | Sample_f (const Vector &o, Vector *wi, float u1, float u2, float u3, float *pdf, BxDFType flags=BSDF_ALL, BxDFType *sampledType=NULL) const |
Spectrum | 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 |
Spectrum | f (const Vector &woW, const Vector &wiW, BxDFType flags=BSDF_ALL) const |
Spectrum | rho (BxDFType flags=BSDF_ALL) const |
Spectrum | 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 MemoryArena | arena |
Friends | |
class | NoSuchClass |
Definition at line 65 of file reflection.h.
BSDF::BSDF | ( | const DifferentialGeometry & | dgs, | |
const Normal & | ngeom, | |||
float | eta = 1.f | |||
) |
Definition at line 450 of file reflection.cpp.
References Cross(), dgShading, DifferentialGeometry::dpdu, nBxDFs, ng, DifferentialGeometry::nn, nn, Normalize(), sn, and tn.
BSDF::~BSDF | ( | ) | [inline, private] |
Definition at line 106 of file reflection.h.
Spectrum BSDF::Sample_f | ( | const Vector & | o, | |
Vector * | wi, | |||
float | u1, | |||
float | u2, | |||
float | u3, | |||
float * | pdf, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL | |||
) | const |
Definition at line 385 of file reflection.cpp.
References Assert, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, bxdfs, Dot(), BxDF::f(), f(), Floor2Int(), LocalToWorld(), nBxDFs, ng, NumComponents(), BxDF::Pdf(), BxDF::Sample_f(), BxDF::type, and WorldToLocal().
Referenced by EstimateDirect(), BidirIntegrator::generatePath(), IrradianceCache::IndirectLo(), WhittedIntegrator::Li(), PhotonIntegrator::Li(), PathIntegrator::Li(), IrradianceCache::Li(), IGIIntegrator::Li(), ExPhotonIntegrator::Li(), DirectLighting::Li(), PhotonIntegrator::Preprocess(), IGIIntegrator::Preprocess(), ExPhotonIntegrator::Preprocess(), and Sample_f().
Spectrum BSDF::Sample_f | ( | const Vector & | wo, | |
Vector * | wi, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL | |||
) | const |
Definition at line 377 of file reflection.cpp.
References Spectrum::Black(), f(), RandomFloat(), and Sample_f().
Definition at line 437 of file reflection.cpp.
References bxdfs, nBxDFs, BxDF::Pdf(), and WorldToLocal().
Referenced by EstimateDirect(), and ExPhotonIntegrator::Li().
void BSDF::Add | ( | BxDF * | bxdf | ) | [inline] |
Definition at line 373 of file reflection.h.
References Assert, bxdfs, MAX_BxDFS, and nBxDFs.
Referenced by UberMaterial::GetBSDF(), Translucent::GetBSDF(), Substrate::GetBSDF(), Skin::GetBSDF(), ShinyMetal::GetBSDF(), Primer::GetBSDF(), Plastic::GetBSDF(), Mirror::GetBSDF(), Matte::GetBSDF(), Glass::GetBSDF(), Felt::GetBSDF(), Clay::GetBSDF(), BrushedMetal::GetBSDF(), and BluePaint::GetBSDF().
int BSDF::NumComponents | ( | ) | const [inline] |
Definition at line 81 of file reflection.h.
Referenced by IrradianceCache::IndirectLo(), ExPhotonIntegrator::Li(), PhotonIntegrator::LPhoton(), ExPhotonIntegrator::LPhoton(), PhotonIntegrator::Preprocess(), ExPhotonIntegrator::Preprocess(), and Sample_f().
int BSDF::NumComponents | ( | BxDFType | flags | ) | const [inline] |
bool BSDF::HasShadingGeometry | ( | ) | const [inline] |
Definition at line 83 of file reflection.h.
Definition at line 86 of file reflection.h.
References Dot().
Referenced by f(), Pdf(), and Sample_f().
Definition at line 89 of file reflection.h.
References Vector::x, Vector::y, and Vector::z.
Referenced by IrradianceCache::IndirectLo(), and Sample_f().
Definition at line 459 of file reflection.cpp.
References BSDF_REFLECTION, BSDF_TRANSMISSION, bxdfs, Dot(), BxDF::f(), nBxDFs, ng, and WorldToLocal().
Referenced by EstimateDirect(), BidirIntegrator::evalPath(), Skin::GetBSDF(), Primer::GetBSDF(), Felt::GetBSDF(), Clay::GetBSDF(), BrushedMetal::GetBSDF(), BluePaint::GetBSDF(), WhittedIntegrator::Li(), IGIIntegrator::Li(), ExPhotonIntegrator::Li(), BidirIntegrator::Li(), PhotonIntegrator::LPhoton(), ExPhotonIntegrator::LPhoton(), and Sample_f().
Definition at line 474 of file reflection.cpp.
References bxdfs, nBxDFs, and BxDF::rho().
Referenced by IrradianceCache::IndirectLo(), PhotonIntegrator::LPhoton(), ExPhotonIntegrator::LPhoton(), IGIIntegrator::Preprocess(), and ExPhotonIntegrator::Preprocess().
static void* BSDF::Alloc | ( | u_int | sz | ) | [inline, static] |
Definition at line 99 of file reflection.h.
static void BSDF::FreeAll | ( | ) | [inline, static] |
Definition at line 100 of file reflection.h.
Referenced by PhotonIntegrator::Preprocess(), IGIIntegrator::Preprocess(), ExPhotonIntegrator::Preprocess(), and Scene::Render().
friend class NoSuchClass [friend] |
Definition at line 107 of file reflection.h.
Definition at line 102 of file reflection.h.
Referenced by BSDF(), BidirIntegrator::generatePath(), IrradianceCache::IndirectLo(), WhittedIntegrator::Li(), PhotonIntegrator::Li(), PathIntegrator::Li(), IrradianceCache::Li(), IGIIntegrator::Li(), ExPhotonIntegrator::Li(), DirectLighting::Li(), DebugIntegrator::Li(), PhotonIntegrator::LPhoton(), ExPhotonIntegrator::LPhoton(), PhotonIntegrator::Preprocess(), IGIIntegrator::Preprocess(), and ExPhotonIntegrator::Preprocess().
const float BSDF::eta |
Definition at line 103 of file reflection.h.
Referenced by WhittedIntegrator::Li(), PhotonIntegrator::Li(), IrradianceCache::Li(), IGIIntegrator::Li(), ExPhotonIntegrator::Li(), and DirectLighting::Li().
int BSDF::nBxDFs [private] |
Definition at line 111 of file reflection.h.
Referenced by Add(), BSDF(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
BxDF* BSDF::bxdfs[MAX_BxDFS] [private] |
Definition at line 113 of file reflection.h.
Referenced by Add(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
MemoryArena BSDF::arena [static, private] |
Definition at line 114 of file reflection.h.