#include <RayCaster.h>
Public Member Functions | |
RayCaster (Scene *s) | |
virtual | ~RayCaster () |
virtual RGBColor | trace (Ray &r) const |
virtual Image | trace (Camera *cam, std::vector< Primitive * > *prList) const |
Definition at line 11 of file RayCaster.h.
rcrt::RayCaster::RayCaster | ( | Scene * | s | ) |
Definition at line 15 of file RayCaster.cpp.
rcrt::RayCaster::~RayCaster | ( | ) | [virtual] |
Definition at line 19 of file RayCaster.cpp.
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 23 of file RayCaster.cpp.
References rcrt::RGBColor::BLACK, rcrt::Scene::castShadows(), rcrt::Ray::dir(), 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::intersect(), rcrt::Scene::isOccluded(), rcrt::Intersection::isValid(), rcrt::LightSample::power(), rcrt::Material::sample(), rcrt::LightSampler::sample(), rcrt::TracingStrategy::scene, and rcrt::LightSample::weight().
Referenced by testLoaders().
Definition at line 61 of file RayCaster.cpp.
References rcrt::RGBColor::b(), rcrt::Scene::castShadows(), rcrt::Ray::dir(), rcrt::LightSample::dirToLight(), rcrt::LightSample::dist(), rcrt::RGBColor::g(), rcrt::Intersection::getDistance(), rcrt::Scene::getLights(), rcrt::Object::getMaterial(), rcrt::Light::getMinSamples(), rcrt::Primitive::getParent(), rcrt::Intersection::getPosition(), rcrt::Intersection::getPrimitive(), rcrt::Camera::getRay(), rcrt::Camera::getResolutionX(), rcrt::Camera::getResolutionY(), rcrt::Intersection::getSNormalW(), rcrt::Light::illuminate(), rcrt::Scene::isOccluded(), rcrt::Intersection::isValid(), rcrt::LightSample::power(), rcrt::RGBColor::r(), rcrt::Material::sample(), rcrt::TracingStrategy::scene, rcrt::Image::setPixel(), rcrt::Ray::tris, and rcrt::LightSample::weight().