00001 /* 00002 File: ProgRad.h 00003 00004 Function: Provides a class for lighting a scene using progressive 00005 radiosity. 00006 00007 Author(s): Andrew Willmott 00008 00009 Copyright: (c) 1997-2000, Andrew Willmott 00010 */ 00011 00012 #ifndef __ProgRad__ 00013 #define __ProgRad__ 00014 00015 #include "RadMethod.h" 00016 00017 class ProgRad : public RadMethod 00018 { 00019 public: 00020 Bool Render(); 00021 Int Stage(Int stage); 00022 RadElem *NewMesh(); 00023 00024 Void DrawMatrix(Renderer &r); 00025 Void DumpStats(); 00026 00027 Void MakeFormFactorFromVector(RadElem &fromPatch, PatchList &patches, 00028 ColourList &result); 00029 00030 ColourList B; // Radiosity of scene elements 00031 ColourList S; // Unshot radiosities 00032 00033 Int maxPowerIndex; 00034 // index of patch with largest unshot power 00035 GCLReal error, maxPower, origShoot; 00036 Colour envRad; 00037 // Ambient radiosity. 00038 Int iterations; 00039 00040 ColourList FFRow; // Row of form factors * reflectance for R, G, B 00041 00042 #ifdef RAD_VIS 00043 Array<ColourList> 00044 FFRows; // previous rows for matrix display 00045 #endif 00046 00047 static Void *New() { return(new ProgRad); }; 00048 }; 00049 00050 #endif