lux::MixBSDF Class Reference

#include <bxdf.h>

Inheritance diagram for lux::MixBSDF:
[legend]
Collaboration diagram for lux::MixBSDF:
[legend]

List of all members.

Public Member Functions

 MixBSDF (const DifferentialGeometry &dgs, const Normal &ngeom)
void Add (float weight, BSDF *bsdf)
virtual int NumComponents () const
virtual int NumComponents (BxDFType flags) const
virtual void SetCompositingParams (CompositingParams *cp)
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

Private Member Functions

virtual ~MixBSDF ()

Private Attributes

int nBSDFs
BSDFbsdfs [MAX_BxDFS]
float weights [MAX_BxDFS]
float totalWeight

Detailed Description

Definition at line 196 of file bxdf.h.


Constructor & Destructor Documentation

MixBSDF::MixBSDF ( const DifferentialGeometry dgs,
const Normal ngeom 
)

Definition at line 442 of file bxdf.cpp.

References nBSDFs.

virtual lux::MixBSDF::~MixBSDF (  )  [inline, private, virtual]

Definition at line 226 of file bxdf.h.


Member Function Documentation

void lux::MixBSDF::Add ( float  weight,
BSDF bsdf 
) [inline]

Definition at line 314 of file bxdf.h.

References bsdfs, MAX_BxDFS, nBSDFs, totalWeight, and weights.

Referenced by lux::MixMaterial::GetBSDF().

SWCSpectrum MixBSDF::f ( const TsPack tspack,
const Vector woW,
const Vector wiW,
BxDFType  flags = BSDF_ALL 
) const [virtual]

Implements lux::BSDF.

Definition at line 515 of file bxdf.cpp.

References lux::AbsDot(), lux::SWCSpectrum::AddWeighted(), bsdfs, nBSDFs, lux::BSDF::nn, totalWeight, and weights.

Referenced by rho().

int lux::MixBSDF::NumComponents ( BxDFType  flags  )  const [inline, virtual]

Implements lux::BSDF.

Definition at line 328 of file bxdf.h.

References bsdfs, nBSDFs, and NumComponents().

int lux::MixBSDF::NumComponents (  )  const [inline, virtual]

Implements lux::BSDF.

Definition at line 321 of file bxdf.h.

References bsdfs, and nBSDFs.

Referenced by NumComponents().

float MixBSDF::Pdf ( const TsPack tspack,
const Vector wo,
const Vector wi,
BxDFType  flags = BSDF_ALL 
) const [virtual]

Implements lux::BSDF.

Definition at line 507 of file bxdf.cpp.

References bsdfs, nBSDFs, totalWeight, and weights.

SWCSpectrum MixBSDF::rho ( const TsPack tspack,
const Vector wo,
BxDFType  flags = BSDF_ALL 
) const [virtual]

Implements lux::BSDF.

Definition at line 542 of file bxdf.cpp.

References lux::SWCSpectrum::AddWeighted(), bsdfs, f(), nBSDFs, lux::BSDF::rho(), totalWeight, and weights.

SWCSpectrum MixBSDF::rho ( const TsPack tspack,
BxDFType  flags = BSDF_ALL 
) const [virtual]

Implements lux::BSDF.

Definition at line 534 of file bxdf.cpp.

References lux::SWCSpectrum::AddWeighted(), bsdfs, f(), nBSDFs, lux::BSDF::rho(), totalWeight, and weights.

bool MixBSDF::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 447 of file bxdf.cpp.

References lux::AbsDot(), lux::SWCSpectrum::AddWeighted(), bsdfs, lux::BSDF::f(), nBSDFs, lux::BSDF::nn, lux::BSDF::Pdf(), totalWeight, and weights.

virtual void lux::MixBSDF::SetCompositingParams ( CompositingParams cp  )  [inline, virtual]

Reimplemented from lux::BSDF.

Definition at line 203 of file bxdf.h.

References bsdfs, lux::BSDF::compParams, and nBSDFs.

Referenced by lux::MixMaterial::GetBSDF().


Member Data Documentation

BSDF* lux::MixBSDF::bsdfs[MAX_BxDFS] [private]

Definition at line 229 of file bxdf.h.

Referenced by Add(), f(), NumComponents(), Pdf(), rho(), Sample_f(), and SetCompositingParams().

Definition at line 228 of file bxdf.h.

Referenced by Add(), f(), MixBSDF(), NumComponents(), Pdf(), rho(), Sample_f(), and SetCompositingParams().

float lux::MixBSDF::totalWeight [private]

Definition at line 231 of file bxdf.h.

Referenced by Add(), f(), Pdf(), rho(), and Sample_f().

float lux::MixBSDF::weights[MAX_BxDFS] [private]

Definition at line 230 of file bxdf.h.

Referenced by Add(), f(), Pdf(), rho(), and Sample_f().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208