DiffuseBSDF Class Reference

Ideal diffuse BSDF (lambertian) defined at a single point on a surface in 3-space. More...

#include <DiffuseBSDF.h>

Inheritance diagram for DiffuseBSDF:

BSDF Sampler SSEAligned

List of all members.

Public Member Functions

Constructors
 DiffuseBSDF (SurfacePoint &pt, Material *parent=NULL)
virtual ~DiffuseBSDF ()
Main usage interface
virtual Event sample ()
 Samples an exitent vector at the given surface point.
virtual real_t getPdf (const Event &event)
virtual SpectralSampleSet getBSDF (const Vector3 &wi, const Vector3 &wo)
 Evaluates the spectral BSDF at the given surface point with respect to the out vector, 'wo', at the underlying surface point and given incident vector, 'wi'.


Detailed Description

Ideal diffuse BSDF (lambertian) defined at a single point on a surface in 3-space.

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008
Parameters:
kd - SpectralSampleSet which scales / attenuates the overall reflectance of the material (diffuse albedo)

Definition at line 21 of file DiffuseBSDF.h.


Constructor & Destructor Documentation

DiffuseBSDF::DiffuseBSDF ( SurfacePoint pt,
Material parent = NULL 
) [inline, explicit]

Definition at line 26 of file DiffuseBSDF.h.

virtual DiffuseBSDF::~DiffuseBSDF (  )  [inline, virtual]

Definition at line 30 of file DiffuseBSDF.h.


Member Function Documentation

Event DiffuseBSDF::sample (  )  [virtual]

Samples an exitent vector at the given surface point.

Returns:
the sampled vector as a Vector3 wrapped in an Event object
Note:
returns Vector3::zero() if no exitent vector was sampled (to model a certain probability of absorption, for instance)
Example usage:

    const Event &event = bsdf.sample();
    const Vector3 &wo  = event.getValue();
    const real_t pd    = bsdf.getPdf(event);        // p(x) probability
    const SpectralSampleSet &fs = bsdf.getBSDF(wo); // f(x) reflectivity
 

Implements BSDF.

Definition at line 20 of file DiffuseBSDF.cpp.

real_t DiffuseBSDF::getPdf ( const Event event  )  [virtual]

Returns:
the probability density of having sampled the given out out vector event with respect to whatever underlying sampling strategy is being used to sample the BSDF
Note:
probability density is assumed to be with respect to projected solid angle (the conversion from solid angle to projected solid angle involves dividing the solid angle density by the absolute value of the cosine of the angle between the local surface normal and the exitant vector in event)

Implements BSDF.

Definition at line 29 of file DiffuseBSDF.cpp.

SpectralSampleSet DiffuseBSDF::getBSDF ( const Vector3 wi,
const Vector3 wo 
) [virtual]

Evaluates the spectral BSDF at the given surface point with respect to the out vector, 'wo', at the underlying surface point and given incident vector, 'wi'.

Returns:
the spectral radiance leaving in direction wo, per unit of irradiance arriving from wi (unitless fraction in [0, 1])

Implements BSDF.

Definition at line 39 of file DiffuseBSDF.cpp.


The documentation for this class was generated from the following files:

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6