PointSampleRenderer Class Reference

Abstraction of renderers which construct their output by point sampling a 2D domain (the film plane). The steps of generating point samples across this domain (SampleGenerator), evaluating the samples (PointSampleRenderer/SampleConsumer), and storing/using the evaluated samples (RenderOutput) have been abstracted from each other. More...

#include <PointSampleRenderer.h>

Inheritance diagram for PointSampleRenderer:

Renderer PropertyMap BidirectionalPathTracer RayTracer PathTracer RayCaster WhittedRayTracer

List of all members.

Public Member Functions

virtual void addSharedSample (const PointSample &s)
virtual void addSharedSamples (const PointSampleList &s)
virtual bool getSharedSample (PointSample &outSample)
virtual void addProducer ()
virtual void removeProducer ()
Constructors
 PointSampleRenderer (RenderOutput *output=NULL, Camera *camera=NULL, Scene *scene=NULL)
virtual ~PointSampleRenderer ()
Main usage interface
virtual void render ()
 Renders the underlying scene synchronously.
virtual void sample (PointSample &outSample)=0
 Renders a single point sample (incident radiance evaluation) at the point specified on the film plane.
virtual void finalize ()
 Called upon finishing a call to render.
Accessors / Mutators
virtual RenderOutputgetOutput ()
virtual void setOutput (RenderOutput *output)

Protected Member Functions

virtual SampleGeneratorThread_getGenerator ()
 Factory method for creating new SampleGeneratorThreads.
virtual SampleConsumer_getConsumer ()
 Factory method for creating new SampleConsumers.

Protected Attributes

QMutex m_renderMutex
 Provides mutual exclusion to 'render' method.
QMutex m_mutex
QWaitCondition m_producer
QWaitCondition m_consumer
PointSampleQueue m_sharedShamples
unsigned m_noProducers
RenderOutputm_output
 Abstract class which aggregates point samples (eg, an Image wrapper).


Detailed Description

Abstraction of renderers which construct their output by point sampling a 2D domain (the film plane). The steps of generating point samples across this domain (SampleGenerator), evaluating the samples (PointSampleRenderer/SampleConsumer), and storing/using the evaluated samples (RenderOutput) have been abstracted from each other.

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008

Definition at line 36 of file PointSampleRenderer.h.


Constructor & Destructor Documentation

PointSampleRenderer::PointSampleRenderer ( RenderOutput output = NULL,
Camera camera = NULL,
Scene scene = NULL 
) [inline]

Definition at line 42 of file PointSampleRenderer.h.

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

Definition at line 48 of file PointSampleRenderer.h.


Member Function Documentation

void PointSampleRenderer::render (  )  [virtual]

Renders the underlying scene synchronously.

Implements Renderer.

Definition at line 22 of file PointSampleRenderer.cpp.

virtual void PointSampleRenderer::sample ( PointSample outSample  )  [pure virtual]

Renders a single point sample (incident radiance evaluation) at the point specified on the film plane.

Implemented in BidirectionalPathTracer, and RayTracer.

void PointSampleRenderer::finalize (  )  [virtual]

Called upon finishing a call to render.

Note:
Default implementation is blank

Reimplemented in BidirectionalPathTracer.

Definition at line 78 of file PointSampleRenderer.cpp.

virtual RenderOutput* PointSampleRenderer::getOutput (  )  [inline, virtual]

Definition at line 83 of file PointSampleRenderer.h.

virtual void PointSampleRenderer::setOutput ( RenderOutput output  )  [inline, virtual]

Definition at line 87 of file PointSampleRenderer.h.

void PointSampleRenderer::addSharedSample ( const PointSample s  )  [virtual]

Definition at line 81 of file PointSampleRenderer.cpp.

void PointSampleRenderer::addSharedSamples ( const PointSampleList &  s  )  [virtual]

Definition at line 93 of file PointSampleRenderer.cpp.

bool PointSampleRenderer::getSharedSample ( PointSample outSample  )  [virtual]

Definition at line 107 of file PointSampleRenderer.cpp.

void PointSampleRenderer::addProducer (  )  [virtual]

Definition at line 125 of file PointSampleRenderer.cpp.

void PointSampleRenderer::removeProducer (  )  [virtual]

Definition at line 131 of file PointSampleRenderer.cpp.

SampleGeneratorThread * PointSampleRenderer::_getGenerator (  )  [protected, virtual]

Factory method for creating new SampleGeneratorThreads.

Definition at line 140 of file PointSampleRenderer.cpp.

SampleConsumer * PointSampleRenderer::_getConsumer (  )  [protected, virtual]

Factory method for creating new SampleConsumers.

Definition at line 153 of file PointSampleRenderer.cpp.


Member Data Documentation

Provides mutual exclusion to 'render' method.

Definition at line 118 of file PointSampleRenderer.h.

QMutex PointSampleRenderer::m_mutex [protected]

Provides mutual exclusion to shared sample list betweeen SampleGeneratorThreads and SampleConsumers

Definition at line 122 of file PointSampleRenderer.h.

QWaitCondition PointSampleRenderer::m_producer [protected]

Wait condition variables used to implement producer/consumer with respect to shared PointSampleQueue

Definition at line 126 of file PointSampleRenderer.h.

QWaitCondition PointSampleRenderer::m_consumer [protected]

Definition at line 127 of file PointSampleRenderer.h.

PointSampleQueue PointSampleRenderer::m_sharedShamples [protected]

Definition at line 129 of file PointSampleRenderer.h.

unsigned PointSampleRenderer::m_noProducers [protected]

Definition at line 130 of file PointSampleRenderer.h.

Abstract class which aggregates point samples (eg, an Image wrapper).

Definition at line 133 of file PointSampleRenderer.h.


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6