Changeset 1909
- Timestamp:
- 12/17/06 16:11:12 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1908 r1909 656 656 const float avgRayContri = 657 657 AvgRayContribution(pvs, splitCandidate.mParentData.mNumRays); 658 659 //Debug << "bvh avgRayContri: " << avgRayContri << " #pvs: " << pvs << " #rays: " << splitCandidate.mParentData.mNumRays << endl;660 //cout << "bvh avgRayContri: " << avgRayContri << endl;661 658 662 659 // high avg ray contri, the result is influenced by undersampling -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1907 r1909 863 863 { 864 864 const int pvs = EvalPvsEntriesSize(*splitCandidate.mParentData.mRays); 865 const float avgRayContri = (float)pvs / ((float)splitCandidate.mParentData.mRays->size() + Limits::Small); 866 867 //Debug << "vsp avgRayContri: " << avgRayContri << " #pvs: " << pvs << " #rays: " << splitCandidate.mParentData.mRays->size() << endl; 868 //cout << "vsp avgRayContri: " << avgRayContri << endl; 865 const float avgRayContri = (float)pvs / 866 ((float)splitCandidate.mParentData.mRays->size() + Limits::Small); 869 867 870 868 // high avg ray contri very, the result is influenced by undersampling … … 977 975 978 976 #if WORK_WITH_VIEWCELLS 979 // remove "parent" view cell from pvs of all objects (traverse t rough rays)977 // remove "parent" view cell from pvs of all objects (traverse through rays) 980 978 RemoveParentViewCellReferences(tData.mNode->GetViewCell()); 981 979 #endif … … 1200 1198 } 1201 1199 1200 ////// 1202 1201 //-- separately handle objects which are in several kd leaves 1203 1202 … … 1396 1395 //-- compute cost 1397 1396 1398 const float lowerPvsLimit = (float)mViewCellsManager->GetMinPvsSize();1399 const float upperPvsLimit = (float)mViewCellsManager->GetMaxPvsSize();1400 1401 1397 const float pOverall = sizeBox; 1402 1398 const float pBack = position - minBox; 1403 1399 const float pFront = maxBox - position; 1404 1400 1405 const float penaltyOld = EvalPvsPenalty(pvsCost, lowerPvsLimit, upperPvsLimit);1406 const float penaltyFront = EvalPvsPenalty(pvsFront, lowerPvsLimit, upperPvsLimit);1407 const float penaltyBack = EvalPvsPenalty(pvsBack, lowerPvsLimit, upperPvsLimit);1401 const float penaltyOld = pvsCost; 1402 const float penaltyFront = pvsFront; 1403 const float penaltyBack = pvsBack; 1408 1404 1409 1405 const float oldRenderCost = penaltyOld * pOverall + Limits::Small; … … 1486 1482 { 1487 1483 //-- place split plane using heuristics 1488 1489 1484 nCostRatio[axis] = 1490 1485 EvalLocalCostHeuristics(tData, … … 1497 1492 { 1498 1493 //-- split plane position is spatial median 1499 1500 1494 nPosition[axis] = (box.Min()[axis] + box.Max()[axis]) * 0.5f; 1501 1495 nCostRatio[axis] = EvalLocalSplitCost(tData, … … 1575 1569 AxisAlignedBox3 backBox; 1576 1570 1577 data.mBoundingBox.Split(candidatePlane.mAxis, candidatePlane.mPosition, frontBox, backBox); 1571 data.mBoundingBox.Split(candidatePlane.mAxis, 1572 candidatePlane.mPosition, 1573 frontBox, 1574 backBox); 1578 1575 1579 1576 // probability that view point lies in back / front node … … 1609 1606 return renderCostDecrease; 1610 1607 } 1611 1612 1608 1613 1609
Note: See TracChangeset
for help on using the changeset viewer.