#include <PhotonTracer.h>
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 | |
PhotonMap * | photonMap |
int | noGPhotons |
int | noCPhotons |
Definition at line 15 of file PhotonTracer.h.
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.
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().
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 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().
PhotonMap* rcrt::PhotonTracer::photonMap [private] |
int rcrt::PhotonTracer::noGPhotons [private] |
int rcrt::PhotonTracer::noCPhotons [private] |