Changeset 2547 for GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
- Timestamp:
- 08/22/07 14:27:41 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2546 r2547 387 387 mOutOfBoundsCell(NULL), 388 388 mStoreRays(false), 389 //mStoreRays(true),390 389 mTimeStamp(1), 391 390 mHierarchyManager(NULL) 392 391 { 393 392 mLocalSubdivisionCandidates = new vector<SortableEntry>; 394 395 bool randomize = false; 396 Environment::GetSingleton()->GetBoolValue("VspTree.Construction.randomize", randomize); 397 if (randomize) 398 Randomize(); // initialise random generator for heuristics 393 ParseEnvironment(); 394 } 395 396 397 VspTree::VspTree(const AxisAlignedBox3 &bbox): 398 mRoot(NULL), 399 mOutOfBoundsCell(NULL), 400 mStoreRays(false), 401 mTimeStamp(1), 402 mHierarchyManager(NULL), 403 mBoundingBox(bbox) 404 { 405 mLocalSubdivisionCandidates = new vector<SortableEntry>; 406 ParseEnvironment(); 407 } 408 409 410 411 void VspTree::ParseEnvironment() 412 { 413 // initialise random generator for heuristics 414 bool randomize; 415 Environment::GetSingleton()->GetBoolValue("VspTree.Construction.randomize", randomize); 416 if (randomize) Randomize(); 399 417 400 418 char subdivisionStatsLog[100]; 401 419 Environment::GetSingleton()->GetStringValue("VspTree.subdivisionStats", subdivisionStatsLog); 402 420 mSubdivisionStats.open(subdivisionStatsLog); 421 403 422 404 423 ///////////// … … 410 429 Environment::GetSingleton()->GetFloatValue("VspTree.Termination.minProbability", mTermMinProbability); 411 430 Environment::GetSingleton()->GetFloatValue("VspTree.Termination.maxRayContribution", mTermMaxRayContribution); 412 431 413 432 Environment::GetSingleton()->GetIntValue("VspTree.Termination.missTolerance", mTermMissTolerance); 414 433 Environment::GetSingleton()->GetIntValue("VspTree.Termination.maxViewCells", mMaxViewCells); … … 432 451 433 452 Environment::GetSingleton()->GetFloatValue("VspTree.Construction.renderCostDecreaseWeight", mRenderCostDecreaseWeight); 434 453 435 454 // if only the driving axis is used for axis aligned split 436 455 Environment::GetSingleton()->GetBoolValue("VspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis); … … 439 458 440 459 //mMemoryConst = (float)(sizeof(VspLeaf) + sizeof(VspViewCell)); 441 //mMemoryConst = 50;//(float)(sizeof(VspViewCell));442 460 //mMemoryConst = (float)(sizeof(VspLeaf) + sizeof(ObjectPvs)); 443 444 mMemoryConst = 16;//(float)sizeof(ObjectPvs); 445 461 //mMemoryConst = (float)sizeof(ObjectPvs); 462 463 // hack 464 mMemoryConst = 16; 465 446 466 447 467 ////////////// … … 450 470 Debug << "******* VSP options ********" << endl; 451 471 452 472 Debug << "max depth: " << mTermMaxDepth << endl; 453 473 Debug << "min PVS: " << mTermMinPvs << endl; 454 474 Debug << "min probabiliy: " << mTermMinProbability << endl; … … 458 478 Debug << "miss tolerance: " << mTermMissTolerance << endl; 459 479 Debug << "max view cells: " << mMaxViewCells << endl; 480 460 481 Debug << "randomize: " << randomize << endl; 461 462 482 Debug << "min global cost ratio: " << mTermMinGlobalCostRatio << endl; 463 483 Debug << "global cost miss tolerance: " << mTermGlobalCostMissTolerance << endl;
Note: See TracChangeset
for help on using the changeset viewer.