Changeset 545 for trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
- Timestamp:
- 01/17/06 00:28:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r544 r545 605 605 mEpsilon); 606 606 607 frontData.mArea = frontData.mGeometry->GetArea(); 608 backData.mArea = backData.mGeometry->GetArea(); 607 //frontData.mArea = frontData.mGeometry->GetArea(); 608 //backData.mArea = backData.mGeometry->GetArea(); 609 frontData.mArea = frontData.mGeometry->GetVolume(); 610 backData.mArea = backData.mGeometry->GetVolume(); 609 611 } 610 612 } … … 851 853 int bestAxis = -1; 852 854 853 // create bounding box of node extent855 // create bounding box of node geometry 854 856 AxisAlignedBox3 box; 855 857 box.Initialize(); … … 877 879 nBackGeom[axis] = new BspNodeGeometry(); 878 880 879 if (!mOnlyDrivingAxis || axis == sAxis)881 if (!mOnlyDrivingAxis || (axis == sAxis)) 880 882 { 881 883 if (!useCostHeuristics) … … 894 896 895 897 pos = box.Max(); pos[axis] = nPosition[axis]; 896 AxisAlignedBox3 backBox(box.Min(), pos);898 const AxisAlignedBox3 backBox(box.Min(), pos); 897 899 backBox.ExtractPolys(nBackGeom[axis]->mPolys); 898 900 899 901 pos = box.Min(); pos[axis] = nPosition[axis]; 900 AxisAlignedBox3 frontBox(pos, box.Max());902 const AxisAlignedBox3 frontBox(pos, box.Max()); 901 903 frontBox.ExtractPolys(nFrontGeom[axis]->mPolys); 902 904 … … 1107 1109 // we can do this because we always save the 1108 1110 // computed values from the axis aligned splits 1109 /*frontData.mGeometry = fGeom;1111 frontData.mGeometry = fGeom; 1110 1112 backData.mGeometry = bGeom; 1111 1113 frontData.mArea = fArea; 1112 1114 backData.mArea = bArea; 1113 */ 1115 1114 1116 //! error also computed if cost ratio is missed 1115 1117 ++ mStat.splits[axis]; … … 1301 1303 mBox, 1302 1304 mEpsilon); 1303 #if 0 1304 AxisAlignedBox3 fbox; 1305 AxisAlignedBox3 bbox; 1306 AxisAlignedBox3 box; 1307 fbox.Initialize(); 1308 bbox.Initialize(); 1309 box.Initialize(); 1310 1311 geomFront.IncludeInBox(fbox); 1312 geomBack.IncludeInBox(bbox); 1313 data.mGeometry->IncludeInBox(box); 1314 1315 areaFront = fbox.GetVolume(); 1316 areaBack = bbox.GetVolume(); 1317 1318 pOverall = box.GetVolume(); 1319 #else 1320 areaFront = geomFront.GetArea(); 1321 areaBack = geomBack.GetArea(); 1305 1306 1307 pFront = geomFront.GetVolume(); 1308 pBack = geomBack.GetVolume(); 1309 //areaFront = geomFront.GetArea(); 1310 //areaBack = geomBack.GetArea(); 1322 1311 1323 1312 pOverall = data.mArea; 1324 #endif 1325 pBack = areaBack; 1326 pFront = areaFront; 1313 1327 1314 } 1328 1315 else // use number of rays to approximate volume
Note: See TracChangeset
for help on using the changeset viewer.