rcrt::PhotonTracer Class Reference

#include <PhotonTracer.h>

Inheritance diagram for rcrt::PhotonTracer:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhotonTracer (Scene *s, PhotonMap *photonMap, const int &noPhotG, const int &noPhotC)
virtual ~PhotonTracer ()
virtual RGBColor trace (Ray &r) const

Private Member Functions

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

Private Attributes

PhotonMapphotonMap
int noGPhotons
int noCPhotons


Detailed Description

A tracer that gets radiance estimates from a photon map to include indirect lighting, caustics and such nice things.

Definition at line 15 of file PhotonTracer.h.


Constructor & Destructor Documentation

rcrt::PhotonTracer::PhotonTracer ( Scene s,
PhotonMap photonMap,
const int &  noPhotG,
const int &  noPhotC 
)

Definition at line 10 of file PhotonTracer.cpp.

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

Definition at line 16 of file PhotonTracer.cpp.


Member Function Documentation

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

Definition at line 20 of file PhotonTracer.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::Intersection::getSNormalW(), 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::PhotonTracer::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 61 of file PhotonTracer.cpp.

References rcrt::RGBColor::avg(), rcrt::Intersection::backSide(), rcrt::RGBColor::BLACK, rcrt::RGBColor::clamped(), 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::PhotonMap::getRadiance(), rcrt::Material::getRealIORPart(), rcrt::Material::getShadingNormal(), rcrt::Ray::getWeight(), rcrt::Material::hasSpecular(), rcrt::Scene::intersect(), rcrt::Intersection::isValid(), noCPhotons, noGPhotons, rcrt::Vec3D::normalize(), photonMap, rcrt::Vec3D::reflect(), rcrt::Material::refracts(), rcrt::Material::sample(), rcrt::Material::sampleSpecular(), rcrt::TracingStrategy::scene, and rcrt::Ray::setCurrDist().


Member Data Documentation

PhotonMap* rcrt::PhotonTracer::photonMap [private]

Definition at line 18 of file PhotonTracer.h.

Referenced by trace().

int rcrt::PhotonTracer::noGPhotons [private]

Definition at line 19 of file PhotonTracer.h.

Referenced by trace().

int rcrt::PhotonTracer::noCPhotons [private]

Definition at line 20 of file PhotonTracer.h.

Referenced by trace().


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