Changeset 445 for trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
- Timestamp:
- 12/02/05 20:38:01 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r444 r445 7 7 #include "Environment.h" 8 8 #include "ViewCellsManager.h" 9 #include "ViewCellBsp.h" 10 #include "VspBspTree.h" 11 #include "VspKdTree.h" 9 12 10 13 Preprocessor::Preprocessor(): … … 12 15 mBspTree(NULL), 13 16 mVspKdTree(NULL), 17 mVspBspTree(NULL), 14 18 mViewCellsManager(NULL) 15 19 { … … 22 26 DEL_PTR(mKdTree); 23 27 DEL_PTR(mVspKdTree); 28 DEL_PTR(mVspBspTree); 24 29 DEL_PTR(mViewCellsManager); 25 30 } … … 167 172 environment->GetStringValue("ViewCells.type", viewCellsStr); 168 173 174 int constructionSamples = 0; 175 169 176 if (strcmp(viewCellsStr, "kdTree") == 0) 170 177 { … … 173 180 if (strcmp(viewCellsStr, "bspTree") == 0) 174 181 { 175 int bspConstructionSamples = 0;176 177 182 mBspTree = new BspTree(); 178 183 179 environment->GetIntValue("BspTree.Construction.samples", bspConstructionSamples); 180 mViewCellsManager = new BspViewCellsManager(mBspTree, bspConstructionSamples); 181 } 182 else if (strcmp(viewCellsStr, "vspTree") == 0) 183 { 184 int vspKdConstructionSamples = 0; 185 186 environment->GetIntValue("VspKdTree.Construction.samples", vspKdConstructionSamples); 187 mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, vspKdConstructionSamples); 184 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 185 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 186 } 187 if (strcmp(viewCellsStr, "vspBspTree") == 0) 188 { 189 mVspBspTree = new VspBspTree(); 190 191 environment->GetIntValue("VspBspTree.Construction.samples", constructionSamples); 192 mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, constructionSamples); 193 } 194 else if (strcmp(viewCellsStr, "vspKdTree") == 0) 195 { 196 mVspKdTree = new VspKdTree(); 197 198 environment->GetIntValue("VspKdTree.Construction.samples", constructionSamples); 199 mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, constructionSamples); 188 200 } 189 201 else if (strcmp(viewCellsStr, "sceneDependent") == 0) 190 202 { 191 203 //TODO 192 int bspConstructionSamples = 0;193 194 environment->GetIntValue("BspTree.Construction.samples", bspConstructionSamples);195 mViewCellsManager = new BspViewCellsManager(mBspTree, bspConstructionSamples);204 mBspTree = new BspTree(); 205 206 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 207 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 196 208 } 197 209 else … … 205 217 206 218 environment->GetIntValue("ViewCells.PostProcessing.samples", postProcessSamples); 207 environment->GetIntValue(" BspTree.Visualization.samples", visSamples);219 environment->GetIntValue("ViewCells.Visualization.samples", visSamples); 208 220 209 221 mViewCellsManager->SetPostProcessSamples(postProcessSamples);
Note: See TracChangeset
for help on using the changeset viewer.