Changeset 1696 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 10/29/06 18:17:38 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1692 r1696 389 389 SplitQueue viewSpaceQueue; 390 390 391 int vspSteps , ospSteps;391 int vspSteps = 0, ospSteps = 0; 392 392 393 393 // use sah for evaluating osp tree construction … … 451 451 // then optimizate view space partition for the current osp 452 452 // and vice versa until iteration depth is reached. 453 453 454 bool lastSplitWasOsp = true; 454 455 … … 948 949 SubdivisionCandidate *sc = NextSubdivisionCandidate(splitQueue); 949 950 950 float rc = (float)sc->GetRenderCostDecrease() / (mInitialRenderCost - mHierarchyStats.mTotalCost + 1.0f); 951 float mc = (float)sc->GetPvsEntriesIncr() / (float)mHierarchyStats.mPvsEntries; 952 951 const float priority = sc->GetPriority(); 952 953 //float rc = (float)sc->GetRenderCostDecrease() / (mInitialRenderCost - mHierarchyStats.mTotalCost + 1.0f); 954 //float mc = (float)sc->GetPvsEntriesIncr() / (float)mHierarchyStats.mPvsEntries; 953 955 //cout << "dRc: " << sc->GetRenderCostDecrease() << " dMem: " << sc->GetPvsEntriesIncr() << " ratio1 " << rc << " ratio2 " << mc << " const: " << 1.0f - GetMemoryConst() << endl; 954 955 // minimum slope reached956 if ((steps > maxSteps) ||957 ((sc->GetPriority() < threshold) && !(steps < minSteps)))958 {959 cout << "\n**************** breaking on " << sc->GetPriority() << " smaller than " << threshold << endl;960 break;961 }962 956 963 957 //////// … … 969 963 if (success) 970 964 { 971 sc->CollectDirtyCandidates(dirtyCandidates, true);965 //sc->CollectDirtyCandidates(dirtyCandidates, true); 972 966 ++ steps; 973 967 } 968 969 DEL_PTR(sc); 970 971 // minimum slope reached 972 if ((steps >= maxSteps) || 973 ((priority < threshold) && !(steps < minSteps))) 974 { 975 cout << "\n**************** breaking on " << priority << " smaller than " << threshold << endl; 976 break; 977 } 978 974 979 } 975 980 … … 1156 1161 AxisAlignedBox3 *forcedViewSpace) 1157 1162 { 1158 // assume object space subdivision constructed1159 //mObjectSpaceSubdivisionType = mSavedObjectSpaceSubdivisionType;1160 1161 1163 const long startTime = GetTime(); 1162 1164 const int limit = mNumMultiLevels; … … 1538 1540 for (oit = objects.begin(); oit != oit_end; ++ oit) 1539 1541 { 1540 (*oit)-> mVssRays.clear();1542 (*oit)->DelRayRefs(); 1541 1543 } 1542 1544 }
Note: See TracChangeset
for help on using the changeset viewer.