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>

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 | |
| SurfacePoint & | getSurfacePoint () |
| Material * | getParent () |
Protected Attributes | |
| SurfacePoint & | m_pt |
| Material * | m_parent |
| Camera * | m_camera |
Detailed Description
Representation of importance defined at a single point on a surface in 3-space (describing a sensor / camera).
- Date:
- Fall 2008
- 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] |
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] |
| 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.
- 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.
| SurfacePoint& Sensor::getSurfacePoint | ( | ) | [inline] |
| Material* Sensor::getParent | ( | ) | [inline] |
Member Data Documentation
SurfacePoint& Sensor::m_pt [protected] |
Material* Sensor::m_parent [protected] |
Camera* Sensor::m_camera [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6