Changeset 1707 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
- Timestamp:
- 11/01/06 23:20:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r1706 r1707 503 503 tstack.push(*it); 504 504 } 505 506 505 } 507 506 } … … 930 929 const int upper = mViewCellsManager->GetMaxPvsSize(); 931 930 932 const float penalty = EvalPvsPenalty((*vit)->GetPvs(). CountObjectsInPvs(), lower, upper);931 const float penalty = EvalPvsPenalty((*vit)->GetPvs().EvalPvsCost(), lower, upper); 933 932 934 933 mDeviation += fabs(mAvgRenderCost - penalty); … … 1023 1022 vc->Mail(); 1024 1023 1025 const int pvs1 = left->GetPvs().CountObjectsInPvs();1026 const int pvs2 = right->GetPvs().CountObjectsInPvs();1024 const float pvs1 = left->GetPvs().EvalPvsCost(); 1025 const float pvs2 = right->GetPvs().EvalPvsCost(); 1027 1026 1028 1027 … … 1030 1029 mMergedViewCells.push_back(vc); 1031 1030 1032 pvsDiff = vc->GetPvs(). CountObjectsInPvs() - pvs1 - pvs2;1031 pvsDiff = vc->GetPvs().EvalPvsCost() - pvs1 - pvs2; 1033 1032 1034 1033 … … 1038 1037 // set scalars 1039 1038 mViewCellsManager->UpdateScalarPvsSize(left, 1040 left->GetPvs(). CountObjectsInPvs(),1039 left->GetPvs().EvalPvsCost(), 1041 1040 left->GetPvs().GetSize()); 1042 1041 … … 1049 1048 // set scalars 1050 1049 mViewCellsManager->UpdateScalarPvsSize(right, 1051 right->GetPvs(). CountObjectsInPvs(),1050 right->GetPvs().EvalPvsCost(), 1052 1051 right->GetPvs().GetSize()); 1053 1052 … … 1336 1335 if (1) 1337 1336 { 1338 const float penalty = EvalPvsPenalty(vc->GetPvs(). CountObjectsInPvs(), lower, upper);1337 const float penalty = EvalPvsPenalty(vc->GetPvs().EvalPvsCost(), lower, upper); 1339 1338 return fabs(mAvgRenderCost - penalty) / (float)mNumActiveViewCells; 1340 1339 } … … 1349 1348 if (mUseAreaForPvs) 1350 1349 { 1351 return vc->GetPvs(). CountObjectsInPvs() * vc->GetArea();1352 } 1353 1354 return vc->GetPvs(). CountObjectsInPvs() * vc->GetVolume();1350 return vc->GetPvs().EvalPvsCost() * vc->GetArea(); 1351 } 1352 1353 return vc->GetPvs().EvalPvsCost() * vc->GetVolume(); 1355 1354 } 1356 1355 … … 1795 1794 if (vc->IsLeaf()) 1796 1795 { 1797 return vc->GetPvs(). CountObjectsInPvs();1798 } 1799 1800 // interior nodes: pvs is either stored as a scalar or1801 // has to be reconstructed from the leaves1796 return vc->GetPvs().EvalPvsCost(); 1797 } 1798 1799 // interior nodes: pvs is either stored as a 1800 // scalar or has to be reconstructed from the leaves 1802 1801 // the stored pvs size is the valid pvs size => just return scalar 1803 1802 if (vc->mPvsSizeValid) … … 1833 1832 } 1834 1833 1835 return newPvs. CountObjectsInPvs();1834 return newPvs.EvalPvsCost(); 1836 1835 } 1837 1836 … … 2002 2001 switch (mViewCellsStorage) 2003 2002 { 2004 case PVS_IN_LEAVES: //-- store pvs only in leaves 2003 case PVS_IN_LEAVES: 2004 // pvs is stored only in leaves 2005 2005 pvsSize = GetPvsSizeForLeafStorage(vc); 2006 2006 break; … … 2012 2012 // pvs is stored consistently in the tree up to the root 2013 2013 // just return pvs size 2014 pvsSize = vc->GetPvs(). CountObjectsInPvs();2014 pvsSize = vc->GetPvs().EvalPvsCost(); 2015 2015 break; 2016 2016 }
Note: See TracChangeset
for help on using the changeset viewer.