lux::Microfacet Class Reference

#include <microfacet.h>

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

List of all members.

Public Member Functions

 Microfacet (const SWCSpectrum &reflectance, Fresnel *f, MicrofacetDistribution *d)
virtual ~Microfacet ()
virtual void f (const TsPack *tspack, const Vector &wo, const Vector &wi, SWCSpectrum *const f) const
float G (const Vector &wo, const Vector &wi, const Vector &wh) const
virtual bool Sample_f (const TsPack *tspack, const Vector &wo, Vector *wi, float u1, float u2, SWCSpectrum *const f, float *pdf, float *pdfBack=NULL, bool reverse=false) const
virtual float Pdf (const TsPack *tspack, const Vector &wo, const Vector &wi) const

Private Attributes

SWCSpectrum R
MicrofacetDistributiondistribution
Fresnelfresnel

Detailed Description

Definition at line 33 of file microfacet.h.


Constructor & Destructor Documentation

Microfacet::Microfacet ( const SWCSpectrum reflectance,
Fresnel f,
MicrofacetDistribution d 
)

Definition at line 32 of file microfacet.cpp.

virtual lux::Microfacet::~Microfacet (  )  [inline, virtual]

Definition at line 38 of file microfacet.h.


Member Function Documentation

void Microfacet::f ( const TsPack tspack,
const Vector wo,
const Vector wi,
SWCSpectrum *const   f 
) const [virtual]

Evaluates the BxDF. Accumulates the result in the f parameter.

Implements lux::BxDF.

Definition at line 40 of file microfacet.cpp.

References lux::SWCSpectrum::AddWeighted(), lux::CosTheta(), lux::MicrofacetDistribution::D(), distribution, lux::Dot(), lux::Fresnel::Evaluate(), fresnel, G(), lux::Normalize(), and R.

Referenced by Sample_f().

float lux::Microfacet::G ( const Vector wo,
const Vector wi,
const Vector wh 
) const [inline]

Definition at line 40 of file microfacet.h.

References lux::AbsDot(), lux::CosTheta(), and cimg_library::cimg::min().

Referenced by f().

float Microfacet::Pdf ( const TsPack tspack,
const Vector wo,
const Vector wi 
) const [virtual]

Reimplemented from lux::BxDF.

Definition at line 70 of file microfacet.cpp.

References distribution, lux::MicrofacetDistribution::Pdf(), and lux::SameHemisphere().

Referenced by Sample_f().

bool Microfacet::Sample_f ( const TsPack tspack,
const Vector wo,
Vector wi,
float  u1,
float  u2,
SWCSpectrum *const   f,
float *  pdf,
float *  pdfBack = NULL,
bool  reverse = false 
) const [virtual]

Samples the BxDF. Returns the result of the BxDF for the sampled direction in f.

Reimplemented from lux::BxDF.

Definition at line 53 of file microfacet.cpp.

References distribution, f(), Pdf(), lux::SameHemisphere(), and lux::MicrofacetDistribution::Sample_f().


Member Data Documentation

Definition at line 56 of file microfacet.h.

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

Definition at line 57 of file microfacet.h.

Referenced by f().

Definition at line 55 of file microfacet.h.

Referenced by f().


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