#include <TracingStrategy.h>
Public Member Functions | |
TracingStrategy (Scene *s) | |
virtual | ~TracingStrategy () |
virtual RGBColor | trace (Ray &r) const =0 |
virtual Image | trace (Camera *cam) const |
virtual Image | trace (Camera *cam, const int &x0, const int &y0, const int &x1, const int &y1) const |
virtual Scene * | getScene () const |
Protected Attributes | |
Scene * | scene |
Definition at line 19 of file TracingStrategy.h.
rcrt::TracingStrategy::TracingStrategy | ( | Scene * | s | ) |
Definition at line 7 of file TracingStrategy.cpp.
rcrt::TracingStrategy::~TracingStrategy | ( | ) | [virtual] |
Definition at line 11 of file TracingStrategy.cpp.
Trace the given ray and return the (approximated) radiance that is coming in at the ray origin, from -ray_direction.
r | the ray |
Implemented in rcrt::BIHTracer, rcrt::DebugTracer, rcrt::PhotonTracer, rcrt::RayCaster, rcrt::SimpleTracer, rcrt::StereoMetaTracer, rcrt::SuperMetaTracer, and rcrt::ThreadedMetaTracer.
Referenced by trace(), rcrt::ThreadedMetaTracer::trace(), rcrt::SuperMetaTracer::trace(), rcrt::StereoMetaTracer::trace(), and rcrt::ThreadedMetaTracer::traceJob().
Trace the full resolution of the given camera. Uses trace(Ray& r).
cam | The camera. |
Reimplemented in rcrt::StereoMetaTracer.
Definition at line 20 of file TracingStrategy.cpp.
References rcrt::Camera::getResolutionX(), rcrt::Camera::getResolutionY(), and trace().
Image rcrt::TracingStrategy::trace | ( | Camera * | cam, | |
const int & | x0, | |||
const int & | y0, | |||
const int & | x1, | |||
const int & | y1 | |||
) | const [virtual] |
Trace only the area specified by (x_0, y_0) and (x_1, y_1) of the given camera.
cam | The camera. |
Reimplemented in rcrt::StereoMetaTracer, rcrt::SuperMetaTracer, and rcrt::ThreadedMetaTracer.
Definition at line 25 of file TracingStrategy.cpp.
References rcrt::RGBColor::b(), rcrt::RGBColor::g(), rcrt::Camera::getRay(), rcrt::RGBColor::r(), rcrt::Image::setPixel(), trace(), and rcrt::Ray::tris.
Scene * rcrt::TracingStrategy::getScene | ( | ) | const [virtual] |
Definition at line 15 of file TracingStrategy.cpp.
References scene.
Scene* rcrt::TracingStrategy::scene [protected] |
Definition at line 22 of file TracingStrategy.h.
Referenced by rcrt::SimpleTracer::directLight(), rcrt::PhotonTracer::directLight(), getScene(), rcrt::SimpleTracer::trace(), rcrt::RayCaster::trace(), rcrt::PhotonTracer::trace(), rcrt::DebugTracer::trace(), and rcrt::BIHTracer::trace().