#include <ThreadedMetaTracer.h>
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 | |
TracingStrategy * | tracer |
Definition at line 15 of file ThreadedMetaTracer.h.
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.
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().
Trace the given ray and return the (approximated) radiance that is coming in at the ray origin, from -ray_direction.
r | the ray |
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().
TracingStrategy* rcrt::ThreadedMetaTracer::tracer [private] |