IrradCacheVisualizer.h

Go to the documentation of this file.
00001 #ifndef __IRRAD_CACHE_VISUALIZER_H
00002 #define __IRRAD_CACHE_VISUALIZER_H
00003 
00004 #include <gra/arch/PhotonMappingArch.h>
00005 #include <gra/render/GLIrradCacheRender.h>
00006 
00007 
00008 using namespace esg;
00009 using namespace gra;
00010 
00011 
00012 namespace gra {
00013 
00019 class IrradCacheVisualizer: public PhotonMappingArch
00020 {
00021     public:
00022         struct Params : public PhotonMappingArch::Params {
00023                 bool performPhotonMapping; 
00024 
00025                 Params() : performPhotonMapping(false) {}
00026         };
00027         
00028     protected:
00029         bool _performPhotonMapping;
00030         
00031     public:
00037         IrradCacheVisualizer(IrradCacheVisualizer::Params& params)
00038             : PhotonMappingArch(params),
00039               _performPhotonMapping(params.performPhotonMapping) {}
00040         
00041 
00045         virtual Render* createRender(void) {
00046             return new GLIrradCacheRender(((_performPhotonMapping) 
00047                                            ? new RTRender(_pIntersector,
00048                                                           _pStopFlag,
00049                                                           _background,
00050                                                           _pixelRendering,
00051                                                           _raysPerPixel,
00052                                                           _fbWriteMode,
00053                                                           _fbWriteElements)
00054                                            : NULL),
00055                                           _pStopFlag);
00056         }
00057 };
00058 
00059 } // namespace
00060 
00061 #endif // __IRRAD_CACHE_VISUALIZER_H
00062 

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