- Timestamp:
- 10/25/06 10:10:54 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r1676 r1677 444 444 if (hm->ConsiderMemory()) 445 445 { 446 const float rc = mRenderCostDecrease / hm->GetHierarchyStats().mTotalCost; 446 //const float rc = mRenderCostDecrease / hm->GetHierarchyStats().mTotalCost; 447 const float rc = mPriority / (hm->mInitialRenderCost - hm->GetHierarchyStats().mTotalCost + 1.0f); 448 //cout << "\np: " << mPriority << " i: " << hm->mInitialRenderCost << " t: " << hm->GetHierarchyStats().mTotalCost << endl; 447 449 //const float mc = mMemoryIncr / / hm->GetHierarchyStats().mMemory; 448 450 const float mc = (float)mPvsEntriesIncr / (float)hm->GetHierarchyStats().mPvsEntries; 449 //cout << "x";450 return hm->GetMemoryConst() * rc +(1.0f - hm->GetMemoryConst()) * mc;451 cout << "osp rc: " << rc << " mc: " << mc << endl; 452 return hm->GetMemoryConst() * rc - (1.0f - hm->GetMemoryConst()) * mc; 451 453 } 452 454 else -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1676 r1677 361 361 362 362 // hack: assume that object space can be seen from view space 363 mHierarchyStats.mTotalCost = (float)objects.size();363 mHierarchyStats.mTotalCost = mInitialRenderCost = (float)objects.size(); 364 364 // only one entry for start 365 365 mHierarchyStats.mPvsEntries = 1; -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1676 r1677 235 235 inline float GetMemoryConst() const { return mMemoryConst; } 236 236 237 float mInitialRenderCost; 237 238 238 239 protected: -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
r1676 r1677 489 489 { 490 490 HierarchyManager *hm = sVspTree->mHierarchyManager; 491 491 492 if (hm->ConsiderMemory()) 492 493 { 493 const float rc = mRenderCostDecrease / hm->GetHierarchyStats().mTotalCost; 494 const float mc = (float)mPvsEntriesIncr / (float)hm->GetHierarchyStats().mPvsEntries; 495 //cout << "y"; 496 return hm->GetMemoryConst() * rc + (1.0f - hm->GetMemoryConst()) * mc; 494 //const float rc = mRenderCostDecrease / hm->GetHierarchyStats().mTotalCost; 495 const float rc = mPriority / (hm->mInitialRenderCost - hm->GetHierarchyStats().mTotalCost + 1.0f); 496 //const float mc = mMemoryIncr / / hm->GetHierarchyStats().mMemory; 497 const float mc = (float)mPvsEntriesIncr / (float)hm->GetHierarchyStats().mPvsEntries; 498 cout << "vsp rc: " << rc << " mc: " << mc << endl; 499 return hm->GetMemoryConst() * rc - (1.0f - hm->GetMemoryConst()) * mc; 497 500 } 498 501 else
Note: See TracChangeset
for help on using the changeset viewer.