Changeset 1744 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 11/13/06 21:25:40 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1743 r1744 91 91 << "#FullMem\n" << mFullMemory << endl 92 92 << "#RenderCostDecrease\n" << mRenderCostDecrease << endl 93 << "#Priority\n" << mPriority << endl 93 94 << "#FpsPerMb\n" << FpsPerMb() << endl 94 95 << endl; … … 142 143 Environment::GetSingleton()->GetBoolValue( 143 144 "Hierarchy.Construction.considerMemory", mConsiderMemory); 144 145 Environment::GetSingleton()->GetBoolValue(146 "Hierarchy.Construction.considerMemory2", mConsiderMemory2);147 145 148 146 Environment::GetSingleton()->GetFloatValue( … … 166 164 Debug << "maximal allowed memory: " << mTermMaxMemory << endl; 167 165 Debug << "consider memory: " << mConsiderMemory << endl; 168 Debug << "consider memory2: " << mConsiderMemory << endl;169 166 Debug << "min steps of same kind: " << mMinStepsOfSameType << endl; 170 167 Debug << "max steps of same kind: " << mMaxStepsOfSameType << endl; … … 266 263 { 267 264 SubdivisionCandidate *splitCandidate = splitQueue.Top(); 268 269 if (splitCandidate->IsDirty())270 splitCandidate->EvalCandidate();271 272 265 splitQueue.Pop(); 273 266 … … 287 280 288 281 HierarchySubdivisionStats stats; 282 289 283 stats.mNumSplits = mHierarchyStats.Leaves(); 290 284 stats.mTotalRenderCost = mHierarchyStats.mTotalCost; … … 295 289 stats.mViewSpaceSplits = mVspTree->mVspStats.Leaves(); 296 290 stats.mObjectSpaceSplits = GetObjectSpaceSubdivisionLeaves(); 297 291 stats.mRenderCostDecrease = mHierarchyStats.mRenderCostDecrease; 292 stats.mPriority = mPriority; 293 298 294 stats.Print(mSubdivisionStats); 299 295 } … … 740 736 const bool success = sc->Apply(splitQueue, terminationCriteriaMet); 741 737 738 if (sc->IsDirty()) 739 cout << "*******************************error!" << endl; 740 742 741 if (!success) // split was not taken 743 742 { 743 cout << "x"; 744 744 return false; 745 745 } 746 746 747 //cout << "priority: " << sc->GetPriority() << " rc decr: " << sc->GetRenderCostDecrease() << " | "; 747 748 /////////////// 748 749 //-- split was successful => update stats and queue … … 750 751 // cost ratio of cost decrease / totalCost 751 752 const float costRatio = sc->GetRenderCostDecrease() / mHierarchyStats.mTotalCost; 752 // Debug<< "ratio: " << costRatio << " min ratio: " << mTermMinGlobalCostRatio << endl;753 //cout << "ratio: " << costRatio << " min ratio: " << mTermMinGlobalCostRatio << endl; 753 754 754 755 if (costRatio < mTermMinGlobalCostRatio) … … 772 773 mHierarchyStats.mMemory += (float)ObjectPvs::GetEntrySizeByte() * pvsEntriesIncr; 773 774 mHierarchyStats.mRenderCostDecrease = sc->GetRenderCostDecrease(); 775 776 mPriority = sc->GetPriority(); 774 777 775 778 static float memoryCount = 0; … … 1391 1394 { 1392 1395 SubdivisionCandidate *candidate = NextSubdivisionCandidate(splitQueue); 1393 // reevaluate local split plane and priority 1396 1397 // reevaluate local split plane and priority 1394 1398 candidate->EvalCandidate(recomputeSplitPlane); 1395 1399 cout << "."; … … 1924 1928 subStats.mViewSpaceSplits = 0; 1925 1929 subStats.mObjectSpaceSplits = 0; 1926 1930 subStats.mRenderCostDecrease = 0; 1927 1931 subStats.Print(stats); 1928 1932
Note: See TracChangeset
for help on using the changeset viewer.