PathTracing.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __PATH_TRACING_H
00004 #define __PATH_TRACING_H
00005 
00006 #include <gra/reflection/RayTracing.h>
00007 #include <esg/visitor/MatVisitor.h>
00008 
00009 /*
00010  * Global reflection model solving the rendering equation employing
00011  * the Monte-Carlo ray tracing.
00012  *
00013  * Default medium refraction is refraction of surrounding environment.
00014  * This is the refraction of air by default (RERF_AIR) but arbitrary value can
00015  * be used, e.g. refraction of water for underwater scenes (REFR_WATER_20C).
00016  */
00017 
00018 using namespace esg;
00019 
00020 namespace gra {
00021 
00022 class GRA_EXPORT PathTracing : public RayTracing {
00023 protected:
00024     unsigned _photonsPerSurface;
00025     
00026 protected:
00027     virtual void _cast_the_ray (PointEnv&, unsigned, bool, Color3f&,
00028                                 const Vector3&, const Vector3&);
00029     
00030     virtual void _cast_secondary_rays (PointEnv&, unsigned, bool, Color3f&,
00031                                        MatVisitor&);
00032 
00033 public:
00034     PathTracing (AutoPtr<LocalReflection> * r = NULL,
00035                  const Color3f            & bg= Color3f(0,0,0),/*Background  */
00036                  Intersector              * i = NULL,
00037                  unsigned                   d = 1,  /*Max depth of recursion */
00038                  float                      w = .001,/*Minimal weight of rays*/
00039                  float                      f = REFR_AIR,/*default refraction*/
00040                  unsigned                   p = 1 /* photons per surface */)
00041         : RayTracing(r, bg, i, d, w, f), _photonsPerSurface(p) {}
00042 };
00043 
00044 } // namespace
00045 
00046 #endif // __PATH_TRACING_H

Generated on Tue Nov 21 15:11:42 2006 for gra by  doxygen 1.4.6