SampleGenerator Class Reference

Point sample generation over the 2D unit interval [0,1]^2. More...

#include <SampleGenerator.h>

Inheritance diagram for SampleGenerator:

PropertyMap SampleGeneratorThread

List of all members.

Public Member Functions

Constructors
 SampleGenerator ()
virtual ~SampleGenerator ()
Initialization
virtual void init ()
 Performs any initialization which may be necessary before beginning to generate samples.
Main usage interface
virtual void generate (PointSampleList &outSamples, const Viewport &v)=0
 Generates samples over the unit square [0,1]^2 with regards to the given viewport and stores them in outSamples.

Static Public Member Functions

Static factory
static SampleGeneratorcreate (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.


Detailed Description

Point sample generation over the 2D unit interval [0,1]^2.

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
Fall 2008
See also:
Viewport

SampleGeneratorThread

Definition at line 20 of file SampleGenerator.h.


Constructor & Destructor Documentation

SampleGenerator::SampleGenerator (  )  [inline]

Definition at line 26 of file SampleGenerator.h.

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

Definition at line 29 of file SampleGenerator.h.


Member Function Documentation

SampleGenerator * SampleGenerator::create ( const std::string &  type  )  [static]

Reimplemented in SampleGeneratorThread.

Definition at line 26 of file SampleGenerator.cpp.

void SampleGenerator::init (  )  [virtual]

Performs any initialization which may be necessary before beginning to generate samples.

Note:
Default implementation is empty

Definition at line 17 of file SampleGenerator.cpp.

virtual void SampleGenerator::generate ( PointSampleList &  outSamples,
const Viewport v 
) [pure virtual]

Generates samples over the unit square [0,1]^2 with regards to the given viewport and stores them in outSamples.

Note:
Samples will be appended to outSamples if outSamples is not initially empty

void SampleGenerator::_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 in SampleGeneratorThread.

Definition at line 20 of file SampleGenerator.cpp.


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6