#include <SimpleTracer.h>
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 |
Definition at line 13 of file SimpleTracer.h.
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.
RGBColor rcrt::SimpleTracer::directLight | ( | Intersection & | is, | |
const Vec3D & | rayDir | |||
) | const [private] |
Calculate direct lighting for the given intersection and incoming viewing ray dir.
is | the Intersection that should be shaded. | |
rayDir | the direction of the incoming viewing ray. |
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().
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 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().