00001
00006 #ifndef RADIOSITY_H
00007 #define RADIOSITY_H
00008
00009
00010
00011
00012
00013
00014 #include "Vector3.h"
00015 #include "defs.h"
00016 #include "poly.h"
00017 #include "color.h"
00018 #include "shade.h"
00019
00020
00021
00022
00023
00024
00025
00027
00036 class RadiosityMethod {
00037
00038 public :
00039
00040 static void initialize(int n, Color *m, Color *dm, Real * a, TriMesh *tmesh, Color *e);
00041 static int select_shooter(int n, Color *dm, Real *a);
00042 static void radiosity_set(Real e, int iter, int vis);
00043
00045 static Color *radiosity_prog(int n, TriMesh *tmesh, Color *e, Color *rho);
00046
00047 protected :
00048
00049 static int converged(int i, Color *dm);
00050 static Real visible(int n, TriMesh *tmesh, Vector3 v, Vector3 d);
00051 static Real formfactor(int i, int j, int n, TriMesh *tmesh, Real *a);
00052 static Color ambient_rad(int n, Color *dm, Real *a);
00053 };
00054
00055 #endif //RADIOSITY_H