RadArch.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __RADIOSITY_ARCHITECTURE_H
00004 #define __RADIOSITY_ARCHITECTURE_H
00005 
00006 #include <gra/arch/Architecture.h>
00007 #include <gra/shader/RadShader.h>
00008 #include <gra/shader/GLShader.h>
00009 
00010 using namespace esg;
00011 
00012 namespace gra {
00013 
00014 #if 0  // TURNED OFF
00015 
00016 class GRA_EXPORT RadArch : public Architecture {
00017 public:
00018         struct Params : public Architecture::Params {
00019                 int   meshDensity; 
00020                 int   quadLevel;   
00021                 float dFError;     
00022                 bool  useAmbient   
00023         };
00024         
00025 protected:
00026     Intersector * _pIntersector;
00027     Radiosity   * _pRadReflection;
00028     LocalShader * _pLocalShader;
00029     int           _meshDensity;
00030     
00031 public:
00032         RadArch (RadArch::Params& params)
00033             int         * s,
00034              Intersector * i,
00035              int           meshDensity = 1,
00036              int           quadLevel   = 0,
00037              float         dFError     = 0.0,
00038              bool          useAmbient  = true)
00039         : Architecture(s),
00040           _pIntersector(i),
00041           _meshDensity(meshDensity)
00042     {
00043         _pRadReflection = new Radiosity(_pIntersector, quadLevel,
00044                                         dFError, useAmbient);
00045         _pLocalShader = new GLShader(GLShader::FACETS, GLShader::SMOOTH);
00046     }
00047 
00048     virtual ~RadArch () { if (_pRadReflection) delete _pRadReflection; }
00049     
00050     virtual Render* createRender (void) {
00051         return new GLRender(_pStopFlag, false, true);
00052     }
00053     
00054     virtual Shader* createShader (void) {
00055         return new RadShader(_pRadReflection, _meshDensity, _pLocalShader);
00056     }
00057 };
00058 
00059 #endif
00060     
00061 } // namespace
00062 
00063 #endif // __RADIOSITY_ARCHITECTURE_H

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