RayTracer.cpp
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @file RayTracer.cpp 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Abstract ray tracing engine, with the following concrete 00009 implementations: WhittedRayTracer, StochasticRayTracer 00010 <!-------------------------------------------------------------------->**/ 00011 00012 #include "RayTracer.h" 00013 #include <PointSample.h> 00014 #include <Camera.h> 00015 #include <QtCore> 00016 #include <Ray.h> 00017 00018 void RayTracer::sample(PointSample &outSample) { 00019 ASSERT(m_scene); 00020 ASSERT(m_camera); 00021 PropertyMap data; 00022 00023 const Ray &ray = m_camera->getWorldRay(outSample.position); 00024 SpectralSampleSet radiance; 00025 00026 _evaluate(ray, radiance, data); 00027 outSample.value.setValue(radiance); 00028 00029 /*if ((unsigned)(outSample.position[0]) == 278 && 00030 (unsigned)(outSample.position[1]) == 71) 00031 { // misc debugging 00032 cerr << radiance << endl; 00033 }*/ 00034 } 00035
Generated on 28 Feb 2009 for Milton by
1.5.6