rcrt::ThreadedMetaTracer Class Reference

#include <ThreadedMetaTracer.h>

Inheritance diagram for rcrt::ThreadedMetaTracer:

Inheritance graph
[legend]
Collaboration diagram for rcrt::ThreadedMetaTracer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ThreadedMetaTracer (TracingStrategy *trac)
virtual ~ThreadedMetaTracer ()
virtual RGBColor trace (Ray &r) const
virtual Image trace (Camera *cam, const int &x0, const int &y0, const int &x1, const int &y1) const

Private Member Functions

void traceJob (Image &img, Camera *cam, const int &x0, const int &y0, const int &x1, const int &y1) const

Private Attributes

TracingStrategytracer


Detailed Description

A meta level tracing strategy, needs another tracer to actually trace anything. Splits up the whole resolution of a camera in two parallel threads and renders thus about twice as fast as the given tracer.

Definition at line 15 of file ThreadedMetaTracer.h.


Constructor & Destructor Documentation

rcrt::ThreadedMetaTracer::ThreadedMetaTracer ( TracingStrategy trac  ) 

Definition at line 9 of file ThreadedMetaTracer.cpp.

rcrt::ThreadedMetaTracer::~ThreadedMetaTracer (  )  [virtual]

Definition at line 14 of file ThreadedMetaTracer.cpp.


Member Function Documentation

void rcrt::ThreadedMetaTracer::traceJob ( Image img,
Camera cam,
const int &  x0,
const int &  y0,
const int &  x1,
const int &  y1 
) const [private]

Definition at line 62 of file ThreadedMetaTracer.cpp.

References rcrt::Image::getPixel(), rcrt::Image::setPixel(), rcrt::TracingStrategy::trace(), and tracer.

Referenced by trace().

RGBColor rcrt::ThreadedMetaTracer::trace ( Ray r  )  const [virtual]

Trace the given ray and return the (approximated) radiance that is coming in at the ray origin, from -ray_direction.

Parameters:
r the ray
Returns:
the radiance

Implements rcrt::TracingStrategy.

Definition at line 18 of file ThreadedMetaTracer.cpp.

References rcrt::TracingStrategy::trace(), and tracer.

Referenced by rcrtAnim(), testPhoton(), and testPhotonRCRT().

Image rcrt::ThreadedMetaTracer::trace ( Camera cam,
const int &  x0,
const int &  y0,
const int &  x1,
const int &  y1 
) const [virtual]

Override the base class implementation and use two threads.

Reimplemented from rcrt::TracingStrategy.

Definition at line 23 of file ThreadedMetaTracer.cpp.

References rcrt::Image::getPixel(), rcrt::Image::setPixel(), and traceJob().


Member Data Documentation

TracingStrategy* rcrt::ThreadedMetaTracer::tracer [private]

Definition at line 18 of file ThreadedMetaTracer.h.

Referenced by trace(), and traceJob().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:33:27 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3