Emitter Class Reference

Abstract representation of emittance defined at a single point on a surface in 3-space (describing a light). More...

#include <Emitter.h>

Inheritance diagram for Emitter:

BSDF Sampler SSEAligned EnvironmentMap NullEmitter OmniEmitter OrientedEmitter

List of all members.

Public Member Functions

Constructors
 Emitter (SurfacePoint &pt, Sampler *sampler=NULL, Material *parent=NULL)
virtual ~Emitter ()
Initialization
virtual void init ()
 Performs any initialization that may be necessary before beginning to use this Emitter.
Main usage interface
virtual bool isEmitter ()
virtual SpectralSampleSet getLe (const Vector3 &wo)=0
virtual SpectralSampleSet getPower ()
virtual SpectralSampleSet getRadiantExitance ()
virtual SpectralSampleSet getLe0 ()
virtual SpectralSampleSet getLe1 (const Vector3 &wo)
virtual void preview (Shape *shape)
 Sets up OpenGL material state (light properties) to enable a crude/fast preview of this light in OpenGL.
Sampling interface
virtual Event sample ()
 Samples an exitent vector according to the underlying distribution of emitted radiance at the surface point.
virtual real_t getPdf (const Event &event)
virtual SpectralSampleSet getBSDF (const Vector3 &wi, const Vector3 &wo)
 Mimics the behavior of a BSDF by separating emittance, Le(x,wo), into two parts: Le0(x) and Le1(x,wo). Le0(x) is independent of 'wo' and represents the total radiant exitance emitted at point x. Le1(x,wo) represents Le(x,w) / Le0(x), or in words, the directional distribution of emitted radiance at x, corresponding to the fraction of emitted radiance in direction 'wo' with respect to the total radiant exitance emitted at point x.
Accessors/Mutators
SurfacePointgetSurfacePoint ()
MaterialgetParent ()

Protected Attributes

SurfacePointm_pt
Materialm_parent
SpectralSampleSet m_power
SpectralSampleSet m_radiantExitance
Samplerm_sampler


Detailed Description

Abstract representation of emittance defined at a single point on a surface in 3-space (describing a light).

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008
The reason Emitter subclasses BSDF is for convenience during generation and evaluation of paths in bidirectional path tracing. Emittance at a point in a given direction, Le(x,wo), is broken into two parts, Le0(x), and Le1(x), as originally detailed by Veach and Guibas (see Eric Veach's thesis, section 8.3.2). Scattering at a vertex can then be uniformly viewed as evaluation / sampling of a BSDF, including initial, fake 'scattering' at a light source, which can be viewed as a special case of scattering with no incident vector (the incident vector is thus disregarded).

See also:
Emitter::getBSDF() or the Path class for more details.

Definition at line 29 of file Emitter.h.


Constructor & Destructor Documentation

Emitter::Emitter ( SurfacePoint pt,
Sampler sampler = NULL,
Material parent = NULL 
) [inline]

Definition at line 34 of file Emitter.h.

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

Definition at line 39 of file Emitter.h.


Member Function Documentation

void Emitter::init (  )  [virtual]

Performs any initialization that may be necessary before beginning to use this Emitter.

Note:
default implementation initializes power from PropertyMap and calculates radiant exitance

Reimplemented from BSDF.

Reimplemented in EnvironmentMap, and NullEmitter.

Definition at line 33 of file Emitter.cpp.

bool Emitter::isEmitter (  )  [virtual]

Returns:
true iff this Emitter emits energy (is a light source)
Note:
if 'isEmitter' returns false, 'getLe' and 'getPower' must return SpectralSampleSet::black

Definition at line 51 of file Emitter.cpp.

virtual SpectralSampleSet Emitter::getLe ( const Vector3 wo  )  [pure virtual]

Returns:
the spectral radiance emitted along the given vector

Implemented in EnvironmentMap, NullEmitter, OmniEmitter, and OrientedEmitter.

SpectralSampleSet Emitter::getPower (  )  [virtual]

Returns:
the spectral power of this Emitter, representing the total radiant energy emitted from surfaces associated with this Emitter (with units watts)
Note:
total Le emitted by integrating 'getLe' over the the sphere of exitant directions and over the surface of the underlying shape should equal the power of this emitter

Definition at line 55 of file Emitter.cpp.

SpectralSampleSet Emitter::getRadiantExitance (  )  [virtual]

Returns:
the spectral radiant exitance (aka radiosity) of the surface containing this Emitter, where radiant exitance is defined as power per unit surface area (with units watts/m^2)

Definition at line 59 of file Emitter.cpp.

SpectralSampleSet Emitter::getLe0 (  )  [virtual]

Returns:
Le0(x,0) which represents the total radiant exitance at this point

Definition at line 63 of file Emitter.cpp.

SpectralSampleSet Emitter::getLe1 ( const Vector3 wo  )  [virtual]

Returns:
Le1(x,wo) which represents the directional distribution of radiant exitance in the given direction

Definition at line 67 of file Emitter.cpp.

void Emitter::preview ( Shape shape  )  [virtual]

Sets up OpenGL material state (light properties) to enable a crude/fast preview of this light in OpenGL.

Note:
default implementation places a GL pointlight at the center of the bounding box of the given shape

Reimplemented from BSDF.

Reimplemented in EnvironmentMap, and NullEmitter.

Definition at line 71 of file Emitter.cpp.

Event Emitter::sample (  )  [virtual]

Samples an exitent vector according to the underlying distribution of emitted radiance at the surface point.

Returns:
the sampled vector

Implements BSDF.

Definition at line 151 of file Emitter.cpp.

real_t Emitter::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 this Emitter

Implements BSDF.

Definition at line 160 of file Emitter.cpp.

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

Mimics the behavior of a BSDF by separating emittance, Le(x,wo), into two parts: Le0(x) and Le1(x,wo). Le0(x) is independent of 'wo' and represents the total radiant exitance emitted at point x. Le1(x,wo) represents Le(x,w) / Le0(x), or in words, the directional distribution of emitted radiance at x, corresponding to the fraction of emitted radiance in direction 'wo' with respect to the total radiant exitance emitted at point x.

Returns:
the directional distribution of emitted radiance in direction 'wo'
Note:
all implementations should disregard 'wi', as it has no physical interpretation in the context of an Emitter

for details, see Eric Veach's thesis, section 8.3.2

Implements BSDF.

Definition at line 167 of file Emitter.cpp.

SurfacePoint& Emitter::getSurfacePoint (  )  [inline]

Returns:
the SurfacePoint at which this Emitter instance is defined

Reimplemented from BSDF.

Definition at line 164 of file Emitter.h.

Material* Emitter::getParent (  )  [inline]

Returns:
the parent Material which instantiated this Emitter
Note:
the parent Material is also a PropertyMap and contians all key-value inputs to this Emitter

Reimplemented from BSDF.

Definition at line 174 of file Emitter.h.


Member Data Documentation

Reimplemented from BSDF.

Definition at line 182 of file Emitter.h.

Reimplemented from BSDF.

Definition at line 183 of file Emitter.h.

Definition at line 186 of file Emitter.h.

Definition at line 189 of file Emitter.h.

Definition at line 191 of file Emitter.h.


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6