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>

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 | |
| SurfacePoint & | getSurfacePoint () |
| Material * | getParent () |
Protected Attributes | |
| SurfacePoint & | m_pt |
| Material * | m_parent |
| SpectralSampleSet | m_power |
| SpectralSampleSet | m_radiantExitance |
| Sampler * | m_sampler |
Detailed Description
Abstract representation of emittance defined at a single point on a surface in 3-space (describing a light).
- Date:
- Fall 2008
- 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] |
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.
- 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] |
| Material* Emitter::getParent | ( | ) | [inline] |
Member Data Documentation
SurfacePoint& Emitter::m_pt [protected] |
Material* Emitter::m_parent [protected] |
SpectralSampleSet Emitter::m_power [protected] |
SpectralSampleSet Emitter::m_radiantExitance [protected] |
Sampler* Emitter::m_sampler [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6