Sensor Class Reference

Representation of importance defined at a single point on a surface in 3-space (describing a sensor / camera). More...

#include <Sensor.h>

Inheritance diagram for Sensor:

BSDF Sampler SSEAligned NullSensor

List of all members.

Public Member Functions

Constructors
 Sensor (SurfacePoint &pt, Material *parent=NULL)
virtual ~Sensor ()
Initialization
virtual void init ()
 Performs any initialization that may be necessary before beginning to use this sensor.
Main usage interface
virtual bool isSensor ()
virtual SpectralSampleSet getWe (const Vector3 &wo)
virtual SpectralSampleSet getWe0 ()
virtual SpectralSampleSet getWe1 (const Vector3 &wo)
virtual SpectralSampleSet getImportance ()
virtual void preview (Shape *shape)
Sampling interface
virtual Event sample ()
 Samples an exitent vector according to the underlying distribution of emitted importance 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, We(x,wo), into two parts: We0(x) and We1(x,wo). We0(x) is independent of 'wo' and represents the total importance emitted at point x. We1(x,wo) represents We(x,w) / We0(x), or in words, the directional distribution of importance emitted at x, corresponding to the fraction of importance emitted in direction 'wo' with respect to the total importance emitted at point x.
virtual bool isSpecular (Event &) const
Accessors/Mutators
SurfacePointgetSurfacePoint ()
MaterialgetParent ()

Protected Attributes

SurfacePointm_pt
Materialm_parent
Cameram_camera


Detailed Description

Representation of importance defined at a single point on a surface in 3-space (describing a sensor / camera).

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008
The reason Sensor subclasses BSDF is for convenience during generation and evaluation of paths in bidirectional path tracing. Importance at a point in a given direction, We(x,wo), is broken into two parts, We0(x), and We1(x,wo), 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 sensor, which can be viewed as a special case of scattering with no exitent vector (the exitent vector is thus disregarded).

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

Definition at line 31 of file Sensor.h.


Constructor & Destructor Documentation

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

Definition at line 36 of file Sensor.h.

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

Definition at line 40 of file Sensor.h.


Member Function Documentation

void Sensor::init (  )  [virtual]

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

Reimplemented from BSDF.

Reimplemented in NullSensor.

Definition at line 28 of file Sensor.cpp.

bool Sensor::isSensor (  )  [virtual]

Returns:
true iff this sensor emits importance (is a valid sensor)
Note:
if 'isSensor' returns false, 'getWe' and 'getImportance' must return SpectralSampleSet::black

Reimplemented in NullSensor.

Definition at line 42 of file Sensor.cpp.

SpectralSampleSet Sensor::getWe ( const Vector3 wo  )  [virtual]

Returns:
the spectral importance emitted along the given vector

Reimplemented in NullSensor.

Definition at line 46 of file Sensor.cpp.

SpectralSampleSet Sensor::getWe0 (  )  [virtual]

Returns:
We0(x,0) which represents the total importance emitted at this point

Definition at line 56 of file Sensor.cpp.

SpectralSampleSet Sensor::getWe1 ( const Vector3 wo  )  [virtual]

Returns:
We1(x,wo) which represents the directional distribution of importance emitted in the given direction

Definition at line 60 of file Sensor.cpp.

SpectralSampleSet Sensor::getImportance (  )  [virtual]

Returns:
the spectral importance of this sensor, representing the total radiant energy emitted from surfaces associated with this sensor; TODO: what units?
Note:
total We emitted by integrating 'getWe' over the the sphere of exitant directions should equal the importance of this sensor

Reimplemented in NullSensor.

Definition at line 52 of file Sensor.cpp.

virtual void Sensor::preview ( Shape shape  )  [inline, virtual]

Note:
implementation is empty

Reimplemented from BSDF.

Definition at line 98 of file Sensor.h.

Event Sensor::sample (  )  [virtual]

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

Returns:
the sampled vector

Implements BSDF.

Reimplemented in NullSensor.

Definition at line 67 of file Sensor.cpp.

real_t Sensor::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 sensor

Implements BSDF.

Reimplemented in NullSensor.

Definition at line 79 of file Sensor.cpp.

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

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

Returns:
the directional distribution of importance emitted in direction 'wo'
Note:
all implementations should disregard 'wo', as it has no physical interpretation in the context of a sensor

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

Implements BSDF.

Reimplemented in NullSensor.

Definition at line 89 of file Sensor.cpp.

virtual bool Sensor::isSpecular ( Event  )  const [inline, virtual]

Returns:
true iff this BSDF is non-zero over a set of solid angles with measure zero (measured with respect to solid angle)
Note:
a perfectly specular material has a dirac distribution for its reflectance, and therefore needs special consideration when sampling the BRDF for simulation purposes

the default implementation returns false because perfectly specular surfaces don't occur that often in real life, though they abound in computer graphics (due to their ease of simulation)

Reimplemented from BSDF.

Definition at line 152 of file Sensor.h.

SurfacePoint& Sensor::getSurfacePoint (  )  [inline]

Returns:
the SurfacePoint at which this BSDF instance is defined

Reimplemented from BSDF.

Definition at line 161 of file Sensor.h.

Material* Sensor::getParent (  )  [inline]

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

Reimplemented from BSDF.

Definition at line 165 of file Sensor.h.


Member Data Documentation

SurfacePoint& Sensor::m_pt [protected]

Reimplemented from BSDF.

Definition at line 173 of file Sensor.h.

Material* Sensor::m_parent [protected]

Reimplemented from BSDF.

Definition at line 174 of file Sensor.h.

Camera* Sensor::m_camera [protected]

Definition at line 176 of file Sensor.h.


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6