src/rcrt/gi/PhotonMap.h

Go to the documentation of this file.
00001 #ifndef PHOTONMAP_H_
00002 #define PHOTONMAP_H_
00003 
00004 #include "Photon.h"
00005 #include "PhotonKDTree.h"
00006 #include "../lights/Light.h"
00007 #include "../Scene.h"
00008 #include <vector>
00009 #include "../materials/Material.h"
00010 
00011 namespace rcrt
00012 {
00013 
00014 class PhotonMap
00015 {
00016 private:
00017         Scene* scene;
00018         std::vector<Photon*> photons;
00019         std::vector<Photon*> caustics;
00020         PhotonKDTree globalTree;
00021         PhotonKDTree causticTree;
00022         float maxRadius;
00023         int maxBounces;
00024         float currentRadius;
00025         float flat;
00026         
00027         void generateJob(Light* light, std::vector<Photon*>* photons, std::vector<Photon*>* caustics1,
00028                         const int& noPhotons, int& storedTotal);
00029         
00030 public:
00031         PhotonMap(Scene* s, const float& maxRadius, const int& maxBounces, const float& flatten = 0);
00032         virtual ~PhotonMap();
00033         
00034         void generate(const int& noPhotons);
00035         
00036         RGBColor getRadiance(const Vec3D& wOut,
00037                         const int& noGPhotons, const int& noCPhotons, Intersection& is);
00038         
00039         const float& getMaxRadius() const;
00040 };
00041 
00042 }
00043 
00044 #endif /*PHOTONMAP_H_*/

Generated on Thu Jan 31 19:26:19 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3