00001 /* 00002 File: MatRad.h 00003 00004 Function: Provides a class for lighting a scene using matrix 00005 radiosity. 00006 00007 Author(s): Andrew Willmott 00008 00009 Copyright: (c) 1997-2000, Andrew Willmott 00010 */ 00011 00012 #ifndef __MatRad__ 00013 #define __MatRad__ 00014 00015 #include "RadMethod.h" 00016 00017 class MatRad : public RadMethod 00018 { 00019 public: 00020 00021 Bool Render(); 00022 Void RemoveDirect(); 00023 RadElem *NewMesh(); 00024 Void DrawMatrix(Renderer &r); 00025 Int Stage(Int stage); 00026 Void DumpStats(); 00027 Void DumpMatrix(); 00028 00029 Matd EmissionVectors(PatchList &patches); 00030 SparseVecd FormFactorToVector(Int j, PatchList &patches); 00031 00032 SparseMatd A[3]; // Array of solution matrices, one each for R, G, B 00033 Matd E; // Emission vectors for R, G, B 00034 Matd B; // Radiosity vectors for R, G, B 00035 Int solverIterations; 00036 Int numPatches; 00037 00038 static Void *New() { return(new MatRad); }; 00039 }; 00040 00041 #endif