#include <bxdf.h>
Public Member Functions | |
| MultiBSDF (const DifferentialGeometry &dgs, const Normal &ngeom, float eta=1.f) | |
| void | Add (BxDF *bxdf) |
| virtual int | NumComponents () const |
| virtual int | NumComponents (BxDFType flags) 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 |
| virtual float | Pdf (const TsPack *tspack, const Vector &wo, const Vector &wi, BxDFType flags=BSDF_ALL) const |
| virtual SWCSpectrum | f (const TsPack *tspack, const Vector &woW, const Vector &wiW, BxDFType flags=BSDF_ALL) const |
| virtual SWCSpectrum | rho (const TsPack *tspack, BxDFType flags=BSDF_ALL) const |
| virtual SWCSpectrum | rho (const TsPack *tspack, const Vector &wo, BxDFType flags=BSDF_ALL) const |
Protected Member Functions | |
| virtual | ~MultiBSDF () |
Protected Attributes | |
| int | nBxDFs |
| BxDF * | bxdfs [MAX_BxDFS] |
Definition at line 161 of file bxdf.h.
| MultiBSDF::MultiBSDF | ( | const DifferentialGeometry & | dgs, | |
| const Normal & | ngeom, | |||
| float | eta = 1.f | |||
| ) |
| virtual lux::MultiBSDF::~MultiBSDF | ( | ) | [inline, protected, virtual] |
| void lux::MultiBSDF::Add | ( | BxDF * | bxdf | ) | [inline] |
Definition at line 302 of file bxdf.h.
References bxdfs, MAX_BxDFS, and nBxDFs.
Referenced by lux::ShinyMetal::GetBSDF(), lux::RoughGlass::GetBSDF(), lux::MatteTranslucent::GetBSDF(), lux::Glass::GetBSDF(), and lux::CarPaint::GetBSDF().
| SWCSpectrum MultiBSDF::f | ( | const TsPack * | tspack, | |
| const Vector & | woW, | |||
| const Vector & | wiW, | |||
| BxDFType | flags = BSDF_ALL | |||
| ) | const [virtual] |
Implements lux::BSDF.
Definition at line 404 of file bxdf.cpp.
References lux::BSDF_REFLECTION, lux::BSDF_TRANSMISSION, bxdfs, lux::Dot(), lux::BxDF::f(), nBxDFs, lux::BSDF::ng, and lux::BSDF::WorldToLocal().
Referenced by rho(), and Sample_f().
| virtual int lux::MultiBSDF::NumComponents | ( | ) | const [inline, virtual] |
| float MultiBSDF::Pdf | ( | const TsPack * | tspack, | |
| const Vector & | wo, | |||
| const Vector & | wi, | |||
| BxDFType | flags = BSDF_ALL | |||
| ) | const [virtual] |
Implements lux::BSDF.
Definition at line 389 of file bxdf.cpp.
References bxdfs, nBxDFs, lux::BxDF::Pdf(), lux::BxDF::Weight(), and lux::BSDF::WorldToLocal().
| SWCSpectrum MultiBSDF::rho | ( | const TsPack * | tspack, | |
| const Vector & | wo, | |||
| BxDFType | flags = BSDF_ALL | |||
| ) | const [virtual] |
Implements lux::BSDF.
Definition at line 431 of file bxdf.cpp.
References bxdfs, f(), nBxDFs, lux::BxDF::rho(), and lux::BSDF::WorldToLocal().
| SWCSpectrum MultiBSDF::rho | ( | const TsPack * | tspack, | |
| BxDFType | flags = BSDF_ALL | |||
| ) | const [virtual] |
| bool MultiBSDF::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 [virtual] |
Samples the BSDF. Returns the result of the BSDF for the sampled direction in f.
Implements lux::BSDF.
Definition at line 298 of file bxdf.cpp.
References lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, bxdfs, lux::Dot(), lux::BxDF::f(), f(), lux::BSDF::LocalToWorld(), lux::BxDF::MatchesFlags(), MAX_BxDFS, nBxDFs, lux::BSDF::ng, lux::BxDF::Pdf(), lux::BxDF::Sample_f(), lux::BxDF::type, lux::BxDF::Weight(), and lux::BSDF::WorldToLocal().
BxDF* lux::MultiBSDF::bxdfs[MAX_BxDFS] [protected] |
Definition at line 192 of file bxdf.h.
Referenced by Add(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
int lux::MultiBSDF::nBxDFs [protected] |
Definition at line 190 of file bxdf.h.
Referenced by Add(), f(), MultiBSDF(), NumComponents(), Pdf(), rho(), and Sample_f().
1.6.2-20100208