00001
00002
00003 #ifndef __RADIOSITY_SHADER_H
00004 #define __RADIOSITY_SHADER_H
00005
00006 #include <gra/shader/GlobalShader.h>
00007 #include <gra/reflection/Radiosity.h>
00008 #include <esg/SceneGraphObject.h>
00009
00010 using namespace esg;
00011
00012 namespace gra {
00013
00021 class GRA_EXPORT RadShader : public GlobalShader {
00022 protected:
00023 int _meshDensity;
00024 LocalShader * _pLocalShader;
00025
00026 public:
00027 RadShader (Radiosity * m, int d, LocalShader * s)
00028 : GlobalShader(m, NULL, NULL), _meshDensity(d), _pLocalShader(s) {}
00029
00030 virtual void setScene (Scene * );
00031
00032 virtual void distributeEnergy (void);
00033
00034 virtual bool setRenderedShape (SceneGraphObject *, const Matrix4 *);
00035
00036 virtual Color3f* illuminatePoint (const Vector3& ,
00037 const Vector3& ,
00038 const Vector3& ,
00039 float ,
00040 double* ,
00041 const Matrix4* );
00042 };
00043
00044 }
00045
00046 #endif // __RADIOSITY_SHADER_H