SampleGeneratorThread Class Reference
Threaded PointSample generation over the 2D unit interval [0,1]^2 (represents the 'producer' in the classic producer/consumer problem). More...
#include <SampleGeneratorThread.h>

Public Member Functions | |
Constructors | |
| SampleGeneratorThread (PointSampleRenderer *renderer=NULL) | |
| virtual | ~SampleGeneratorThread () |
Main usage interface | |
| virtual void | run () |
Accessors / Mutators | |
| PointSampleRenderer * | getRenderer () |
| void | setRenderer (PointSampleRenderer *renderer) |
| const Viewport & | getViewport () const |
| void | setViewport (const Viewport &v) |
Static Public Member Functions | |
Static factory | |
| static SampleGeneratorThread * | create (const std::string &type) |
Protected Member Functions | |
| virtual void | _addSample (const PointSample &s, PointSampleList &samples) |
| Main interface for subclasses to add a given PointSample to be 'generated'. Default implementation is simple: samples.push_back(s); Subclasses should not access samples list directly but should instead use this method which allows for SampleGeneratorThread to override _addSample to instead notify a PointSampleRenderer's shared pool of pending work. | |
Protected Attributes | |
| Viewport | m_viewport |
| PointSampleRenderer * | m_renderer |
Detailed Description
Threaded PointSample generation over the 2D unit interval [0,1]^2 (represents the 'producer' in the classic producer/consumer problem).
- Date:
- Fall 2008
- See also:
- Viewport
Definition at line 23 of file SampleGeneratorThread.h.
Constructor & Destructor Documentation
| SampleGeneratorThread::SampleGeneratorThread | ( | PointSampleRenderer * | renderer = NULL |
) | [inline] |
Definition at line 29 of file SampleGeneratorThread.h.
| SampleGeneratorThread::~SampleGeneratorThread | ( | ) | [virtual] |
Definition at line 21 of file SampleGeneratorThread.cpp.
Member Function Documentation
| SampleGeneratorThread * SampleGeneratorThread::create | ( | const std::string & | type | ) | [static] |
| void SampleGeneratorThread::run | ( | ) | [virtual] |
Generates samples over the unit domain in a new thread ('producer')
Definition at line 27 of file SampleGeneratorThread.cpp.
| PointSampleRenderer* SampleGeneratorThread::getRenderer | ( | ) | [inline] |
Definition at line 58 of file SampleGeneratorThread.h.
| void SampleGeneratorThread::setRenderer | ( | PointSampleRenderer * | renderer | ) |
Definition at line 40 of file SampleGeneratorThread.cpp.
| const Viewport& SampleGeneratorThread::getViewport | ( | ) | const [inline] |
Definition at line 64 of file SampleGeneratorThread.h.
| void SampleGeneratorThread::setViewport | ( | const Viewport & | v | ) | [inline] |
Definition at line 68 of file SampleGeneratorThread.h.
| void SampleGeneratorThread::_addSample | ( | const PointSample & | s, | |
| PointSampleList & | samples | |||
| ) | [protected, virtual] |
Main interface for subclasses to add a given PointSample to be 'generated'. Default implementation is simple: samples.push_back(s); Subclasses should not access samples list directly but should instead use this method which allows for SampleGeneratorThread to override _addSample to instead notify a PointSampleRenderer's shared pool of pending work.
Reimplemented from SampleGenerator.
Definition at line 34 of file SampleGeneratorThread.cpp.
Member Data Documentation
Viewport SampleGeneratorThread::m_viewport [protected] |
Definition at line 79 of file SampleGeneratorThread.h.
PointSampleRenderer* SampleGeneratorThread::m_renderer [protected] |
Definition at line 80 of file SampleGeneratorThread.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6