WhittedRayTracer.h

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @class  WhittedRayTracer
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @author Matthew Jacobs (jacobs.mh@gmail.com)
00005    @date   Fall 2008
00006 
00007    @brief
00008       Classic Whitted-style raytracer; for a concise introduction to 
00009    raytracing, see http://www.raytracing.co.uk/study/ray_intro.htm
00010    <!-------------------------------------------------------------------->**/
00011 
00012 #ifndef WHITTED_RAY_TRACER_H_
00013 #define WHITTED_RAY_TRACER_H_
00014 
00015 #include <renderers/renderers/RayTracer.h>
00016 
00017 class WhittedRayTracer : public RayTracer {
00018    public:
00019       ///@name Constructors
00020       //@{-----------------------------------------------------------------
00021       
00022       inline WhittedRayTracer(RenderOutput *output = NULL, 
00023                               Camera *camera = NULL, 
00024                               Scene *scene = NULL)
00025          : RayTracer(output, camera, scene), m_noIndirectSamples(1), 
00026            m_maxDepth(5), m_ambient(SpectralSampleSet::fill(0.05))
00027       { }
00028       
00029       virtual ~WhittedRayTracer()
00030       { }
00031       
00032       //@}-----------------------------------------------------------------
00033       
00034       virtual void init();
00035       
00036    protected:
00037       virtual void _evaluate(const Ray &ray, SpectralSampleSet &outRadiance, 
00038                              PropertyMap &data);
00039       
00040    protected:
00041       unsigned m_noIndirectSamples;
00042       unsigned m_maxDepth;
00043       
00044       SpectralSampleSet m_ambient;
00045 };
00046 
00047 #endif // WHITTED_RAY_TRACER_H_
00048 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6