rcrt::SimpleTracer Class Reference

#include <SimpleTracer.h>

Inheritance diagram for rcrt::SimpleTracer:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimpleTracer (Scene *s)
virtual ~SimpleTracer ()
virtual RGBColor trace (Ray &r) const

Private Member Functions

RGBColor directLight (Intersection &is, const Vec3D &rayDir) const


Detailed Description

A simple tracer that takes direct light, reflections and refractions into account.

Definition at line 13 of file SimpleTracer.h.


Constructor & Destructor Documentation

rcrt::SimpleTracer::SimpleTracer ( Scene s  ) 

Definition at line 16 of file SimpleTracer.cpp.

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

Definition at line 20 of file SimpleTracer.cpp.


Member Function Documentation

RGBColor rcrt::SimpleTracer::directLight ( Intersection is,
const Vec3D rayDir 
) const [private]

Calculate direct lighting for the given intersection and incoming viewing ray dir.

Parameters:
is the Intersection that should be shaded.
rayDir the direction of the incoming viewing ray.
Returns:
the irradiance

Definition at line 31 of file SimpleTracer.cpp.

References rcrt::Scene::castShadows(), rcrt::LightSample::dirToLight(), rcrt::LightSample::dist(), rcrt::Scene::getLights(), rcrt::Object::getMaterial(), rcrt::Light::getMinSamples(), rcrt::Primitive::getParent(), rcrt::Intersection::getPosition(), rcrt::Intersection::getPrimitive(), rcrt::Light::getSampler(), rcrt::Material::getShadingNormal(), rcrt::Light::hasSampler(), rcrt::Light::illuminate(), rcrt::Scene::isOccluded(), rcrt::LightSample::power(), rcrt::Material::sample(), rcrt::LightSampler::sample(), rcrt::TracingStrategy::scene, and rcrt::LightSample::weight().

Referenced by trace().

RGBColor rcrt::SimpleTracer::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 73 of file SimpleTracer.cpp.

References rcrt::RGBColor::avg(), rcrt::Intersection::backSide(), rcrt::RGBColor::BLACK, rcrt::Ray::dir(), directLight(), rcrt::frTDielectric(), rcrt::Material::getAbsorbance(), rcrt::Ray::getDepth(), rcrt::Intersection::getDistance(), rcrt::Material::getEmitted(), rcrt::Ray::getLastIOR(), rcrt::Object::getMaterial(), rcrt::Primitive::getParent(), rcrt::Intersection::getPosition(), rcrt::Intersection::getPrimitive(), rcrt::Material::getRealIORPart(), rcrt::Material::getShadingNormal(), rcrt::Ray::getWeight(), rcrt::Scene::intersect(), rcrt::Intersection::isValid(), rcrt::Vec3D::reflect(), rcrt::Material::refracts(), rcrt::Material::sampleSpecular(), rcrt::TracingStrategy::scene, and rcrt::Ray::setCurrDist().


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