rcrt::TracingStrategy Class Reference

#include <TracingStrategy.h>

Inheritance diagram for rcrt::TracingStrategy:

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

Collaboration graph
[legend]

List of all members.

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 ScenegetScene () const

Protected Attributes

Scenescene


Detailed Description

Abstract tracing base class, provides an interface that all tracers should implement and basic functionality for tracing cameras.

Definition at line 19 of file TracingStrategy.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

virtual RGBColor rcrt::TracingStrategy::trace ( Ray r  )  const [pure 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

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().

Image rcrt::TracingStrategy::trace ( Camera cam  )  const [virtual]

Trace the full resolution of the given camera. Uses trace(Ray& r).

Parameters:
cam The camera.
Returns:
An Image with the size of the cams resolution

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.

Parameters:
cam The camera.
Returns:
An Image with the size of the specified area. (x_0, y_0) ~> (0,0) in the image.

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]

Returns:
the scene the tracer was initialised with.

Definition at line 15 of file TracingStrategy.cpp.

References scene.


Member Data Documentation

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().


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