Changeset 837 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 04/27/06 09:29:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r822 r837 1247 1247 1248 1248 // the relative cost ratio 1249 float ratio = /*Limits::Infinity;*/99999999.0 ;1249 float ratio = /*Limits::Infinity;*/99999999.0f; 1250 1250 bool splitPlaneFound = false; 1251 1251 … … 1430 1430 int bestAxis; 1431 1431 1432 // if max cost ratio is exceeded, take split along longest axis instead 1433 const float maxCostRatioForArbitraryAxis = 0.9f; 1434 1432 1435 if (mUseDrivingAxisForMaxCost) 1433 1436 bestAxis = box.Size().DrivingAxis(); … … 1437 1440 // mximum cost ratio for axis to be valid: 1438 1441 // if exceeded, spatial mid split is used instead 1439 const float maxCostRatio = 0.9f; 1440 1441 // hack : subdivide along driving axis up to certain depth 1442 int maxDepthForDrivingAxis = 0; 1443 const maxCostRatioForHeur = 0.99; 1444 1445 const bool useSpecialAxis = mOnlyDrivingAxis || mUseRandomAxis || 1446 mCirculatingAxis; 1442 //const maxCostRatioForHeur = 0.99f; 1443 1444 1445 const bool useSpecialAxis = 1446 mOnlyDrivingAxis || mUseRandomAxis || mCirculatingAxis; 1447 1447 1448 1448 … … 1476 1476 1477 1477 //-- split plane position is spatial median 1478 //-- use median split if cost ratio very low as 1479 //-- there are not enough visibility cues 1480 1481 else //if (!mUseCostHeuristics || (nCostRatio[axis] > maxCostRatioForHeur)) 1478 1479 1480 // also use median split if cost ratio very low as 1481 // there are not enough visibility cues 1482 //if (!mUseCostHeuristics || (nCostRatio[axis] > maxCostRatioForHeur)) 1483 else 1482 1484 { 1483 1485 … … 1541 1543 { 1542 1544 // NOTE: takes longest axis split if cost ratio exceeds threshold 1543 if (nCostRatio[axis] < min(maxCostRatio , nCostRatio[bestAxis]))1545 if (nCostRatio[axis] < min(maxCostRatioForArbitraryAxis, nCostRatio[bestAxis])) 1544 1546 { 1545 1547 bestAxis = axis; 1546 1548 } 1547 //else if (nCostRatio[axis] < nCostRatio[bestAxis])1548 // Debug << "warning!! different path taken: " << axis << " " << bestAxis<< endl;1549 else if (nCostRatio[axis] < nCostRatio[bestAxis]) 1550 Debug << "taking split along longest axis (" << bestAxis << ") instead of (" << axis << ")" << endl; 1549 1551 1550 1552 }
Note: See TracChangeset
for help on using the changeset viewer.