Changeset 978 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 05/23/06 09:33:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r971 r978 1453 1453 bestAxis = -1; 1454 1454 1455 // mximum cost ratio for axis to be valid: 1455 #if 0 1456 // maximum cost ratio for axis to be valid: 1456 1457 // if exceeded, spatial mid split is used instead 1457 //const maxCostRatioForHeur = 0.99f; 1458 1459 1458 const maxCostRatioForHeur = 0.99f; 1459 #endif 1460 1461 // if we use some kind of specialised fixed axis 1460 1462 const bool useSpecialAxis = 1461 1463 mOnlyDrivingAxis || mUseRandomAxis || mCirculatingAxis; 1462 1464 1463 1464 // use some kind of specialised fixed axis1465 1465 if (mUseRandomAxis) 1466 1466 sAxis = Random(3); … … 1543 1543 } 1544 1544 1545 1546 if (!mUseDrivingAxisForMaxCost) 1545 1546 if (mUseDrivingAxisForMaxCost) 1547 { 1548 // we take longest axis split if cost ratio exceeds threshold 1549 if (nCostRatio[axis] < min(maxCostRatioForArbitraryAxis, nCostRatio[bestAxis])) 1550 { 1551 bestAxis = axis; 1552 } 1553 else if (nCostRatio[axis] < nCostRatio[bestAxis]) 1554 Debug << "taking split along longest axis (" << bestAxis << ") instead of (" << axis << ")" << endl; 1555 1556 } 1557 else 1547 1558 { 1548 1559 if (bestAxis == -1) … … 1554 1565 bestAxis = axis; 1555 1566 } 1556 } 1557 else 1558 { 1559 // NOTE: takes longest axis split if cost ratio exceeds threshold 1560 if (nCostRatio[axis] < min(maxCostRatioForArbitraryAxis, nCostRatio[bestAxis])) 1561 { 1562 bestAxis = axis; 1563 } 1564 else if (nCostRatio[axis] < nCostRatio[bestAxis]) 1565 Debug << "taking split along longest axis (" << bestAxis << ") instead of (" << axis << ")" << endl; 1566 1567 } 1567 } 1568 1568 } 1569 1569 }
Note: See TracChangeset
for help on using the changeset viewer.