Event Class Reference
Represents a single event which was sampled from a Sampler. The internal value of this event is stored as a variant using boost::any, where the concrete value of type T can be extracted using Event<T>::getValue(). More...
#include <Event.h>
Inheritance diagram for Event:

Public Member Functions | |
Constructors | |
| Event (const boost::any &x, Sampler *randomVar=NULL, const boost::any &metadata=boost::any(), real_t p=-1) | |
| Event (const boost::any &x, const Event &event) | |
| Event (Sampler *randomVar=NULL, const boost::any &metadata=boost::any()) | |
| virtual | ~Event () |
Main usage interface | |
| template<typename T> | |
| T | getValue () const |
| template<typename T> | |
| T | getMetadata () const |
| real_t | getPdf () |
Accessors/Mutators | |
| boost::any | getValue () const |
| void | setValue (const boost::any &x) |
| bool | hasValue () const |
| Sampler * | getParent () |
| void | setParent (Sampler *randomVar) |
| boost::any | getMetadata () const |
| void | setMetadata (const boost::any &metadata) |
| bool | hasMetadata () const |
Convenience implicit conversions for common Event types | |
| operator real_t () const | |
| operator int () const | |
| operator Vector3 () const | |
| operator SpectralSampleSet () const | |
Protected Attributes | |
| boost::any | m_x |
| internal value variant | |
| boost::any | m_metadata |
| Sampler * | m_sampler |
| parent random distribution from which this event was sampled | |
| real_t | m_p |
Detailed Description
Represents a single event which was sampled from a Sampler. The internal value of this event is stored as a variant using boost::any, where the concrete value of type T can be extracted using Event<T>::getValue().
- Date:
- Fall 2008
Definition at line 30 of file Event.h.
Constructor & Destructor Documentation
| Event::Event | ( | const boost::any & | x, | |
| const Event & | event | |||
| ) | [inline] |
| Event::Event | ( | Sampler * | randomVar = NULL, |
|
| const boost::any & | metadata = boost::any() | |||
| ) | [inline] |
Member Function Documentation
| real_t Event::getPdf | ( | ) |
| void Event::setMetadata | ( | const boost::any & | metadata | ) | [inline] |
| Event::operator real_t | ( | ) | const [inline] |
| Event::operator int | ( | ) | const [inline] |
| Event::operator Vector3 | ( | ) | const [inline] |
| Event::operator SpectralSampleSet | ( | ) | const [inline] |
- Returns:
- this Event as a SpectralSampleSet (implicit conversion) for convenience purposes
Member Data Documentation
boost::any Event::m_x [protected] |
boost::any Event::m_metadata [protected] |
Sampler* Event::m_sampler [protected] |
real_t Event::m_p [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6