Changeset 473 for trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
- Timestamp:
- 12/20/05 20:33:42 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r469 r473 175 175 176 176 int constructionSamples = 0; 177 178 if (strcmp(viewCellsStr, "kdTree") == 0) 179 { 180 mViewCellsManager = new KdViewCellsManager(mKdTree); 181 } 182 else if (strcmp(viewCellsStr, "bspTree") == 0) 183 { 184 mBspTree = new BspTree(); 185 186 Debug << "view cell type: Bsp" << endl; 187 188 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 189 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 190 } 191 else if (strcmp(viewCellsStr, "vspBspTree") == 0) 192 { 193 mVspBspTree = new VspBspTree(); 194 195 Debug << "view cell type: VspBsp" << endl; 196 197 environment->GetIntValue("VspBspTree.Construction.samples", constructionSamples); 198 mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, constructionSamples); 199 } 200 else if (strcmp(viewCellsStr, "vspKdTree") == 0) 201 { 202 mVspKdTree = new VspKdTree(); 203 204 environment->GetIntValue("VspKdTree.Construction.samples", constructionSamples); 205 mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, constructionSamples); 206 } 207 else if (strcmp(viewCellsStr, "sceneDependent") == 0) 208 { 209 //TODO 210 mBspTree = new BspTree(); 211 212 Debug << "view cell type: Bsp" << endl; 213 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 214 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 215 } 216 else 217 { 218 cerr<<"Wrong view cells type" << viewCellsStr << endl; 219 exit(1); 220 } 177 221 178 222 float objRenderCost = 0, vcOverhead = 0, moveSpeed = 0; … … 182 226 environment->GetFloatValue("Simulation.moveSpeed", moveSpeed); 183 227 184 mRenderSimulator = new RenderSimulator(objRenderCost, vcOverhead, moveSpeed); 185 186 if (strcmp(viewCellsStr, "kdTree") == 0) 187 { 188 mViewCellsManager = new KdViewCellsManager(mKdTree); 189 } 190 else if (strcmp(viewCellsStr, "bspTree") == 0) 191 { 192 mBspTree = new BspTree(); 193 194 Debug << "view cell type: Bsp" << endl; 195 196 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 197 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 198 } 199 else if (strcmp(viewCellsStr, "vspBspTree") == 0) 200 { 201 mVspBspTree = new VspBspTree(); 202 203 Debug << "view cell type: VspBsp" << endl; 204 205 environment->GetIntValue("VspBspTree.Construction.samples", constructionSamples); 206 mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, constructionSamples); 207 } 208 else if (strcmp(viewCellsStr, "vspKdTree") == 0) 209 { 210 mVspKdTree = new VspKdTree(); 211 212 environment->GetIntValue("VspKdTree.Construction.samples", constructionSamples); 213 mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, constructionSamples); 214 } 215 else if (strcmp(viewCellsStr, "sceneDependent") == 0) 216 { 217 //TODO 218 mBspTree = new BspTree(); 219 220 Debug << "view cell type: Bsp" << endl; 221 environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 222 mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 223 } 224 else 225 { 226 cerr<<"Wrong view cells type" << viewCellsStr << endl; 227 exit(1); 228 } 229 228 mRenderSimulator = 229 new RenderSimulator(mViewCellsManager, objRenderCost, vcOverhead, moveSpeed); 230 230 231 int postProcessSamples = 0; 231 232 int visSamples = 0;
Note: See TracChangeset
for help on using the changeset viewer.