Changeset 1679 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 10/25/06 20:29:41 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1677 r1679 319 319 AxisAlignedBox3 *forcedViewSpace) 320 320 { 321 mTimeStamp = 1; 322 321 323 switch (mConstructionType) 322 324 { … … 422 424 // then optimizate view space partition for the current osp 423 425 // and vice versa until iteration depth is reached. 424 426 bool lastSplitWasOsp = true; 425 427 while (!(viewSpaceQueue.Empty() && objectSpaceQueue.Empty())) 426 428 { … … 432 434 433 435 // should view or object space be subdivided further? 434 if (ospPriority >= vspPriority) 435 { 436 //if (ospPriority >= vspPriority) 437 if (!lastSplitWasOsp) 438 { 439 lastSplitWasOsp = true; 436 440 cout << "osp" << endl; 437 441 // dirtied view space candidates … … 456 460 else 457 461 { 462 lastSplitWasOsp = false; 458 463 cout << "vsp" << endl; 459 464 … … 912 917 const float threshold = oldCandidate ? oldCandidate->GetPriority() : 1e20; 913 918 SubdivisionCandidate *sc = NextSubdivisionCandidate(splitQueue); 914 //cout << "here2 " << sc->GetPriority() << " " << threshold << endl; 919 //cout << "here2 " << sc->GetRenderCostDecrease() << " " << threshold << endl; 920 float rc = (float)sc->GetRenderCostDecrease() / (mInitialRenderCost - mHierarchyStats.mTotalCost + 1.0f); 921 float mc = (float)sc->GetPvsEntriesIncr() / (float)mHierarchyStats.mPvsEntries; 922 923 //cout << "dRc: " << sc->GetRenderCostDecrease() << " dMem: " << sc->GetPvsEntriesIncr() << " ratio1 " << rc << " ratio2 " << mc << " const: " << 1.0f - GetMemoryConst() << endl; 915 924 916 925 // minimum slope reached … … 1505 1514 1506 1515 1507 void HierarchyManager::FinishObjectSpaceSubdivision(const ObjectContainer &objects, const bool removeRayRefs) const 1516 void HierarchyManager::FinishObjectSpaceSubdivision(const ObjectContainer &objects, 1517 const bool removeRayRefs) const 1508 1518 { 1509 1519 switch (mObjectSpaceSubdivisionType)
Note: See TracChangeset
for help on using the changeset viewer.