- Timestamp:
- 10/18/05 02:20:58 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r335 r336 41 41 42 42 /** Evaluates split plane classification with respect to the plane's 43 contribution for a balancedtree.43 contribution for a minimum number splits in the tree. 44 44 */ 45 45 float BspTree::sLeastSplitsTable[] = {0, 0, 1, 0}; 46 46 /** Evaluates split plane classification with respect to the plane's 47 contribution for a minimum number splits in thetree.47 contribution for a balanced tree. 48 48 */ 49 float BspTree::sBalanced PolysTable[] = {-1, 1, 0, 0};49 float BspTree::sBalancedTreeTable[] = {-1, 1, 0, 0}; 50 50 51 51 /****************************************************************/ … … 1108 1108 1109 1109 if (sSplitPlaneStrategy & BALANCED_POLYS) 1110 sumBalancedPolys += sBalanced PolysTable[classification];1110 sumBalancedPolys += sBalancedTreeTable[classification]; 1111 1111 1112 1112 if (sSplitPlaneStrategy & LEAST_SPLITS) … … 1126 1126 if (classification == Plane3::COINCIDENT) 1127 1127 sumBlockedRays += blockedRays; 1128 Debug << "adding rays: " << blockedRays << endl; 1129 1128 1130 1129 totalBlockedRays += blockedRays; 1131 1130 } … … 1139 1138 { 1140 1139 viewCell->Mail(); 1141 1142 if (classification == Plane3::FRONT_SIDE) 1143 sumBalancedViewCells += 1.0f; 1144 else if (viewCell && (classification == Plane3::BACK_SIDE)) 1145 sumBalancedViewCells -= 1.0f; 1140 sumBalancedViewCells += sBalancedTreeTable[classification]; 1141 1146 1142 ++ totalViewCells; 1147 1143 } … … 1185 1181 for (rit = rays.begin(); rit != rays.end(); ++ rit) 1186 1182 { 1183 Ray *ray = *rit; 1184 1185 float maxT = 1e6; 1186 float minT = 0; 1187 1188 // test with tree bounding box 1189 /*if (!mBox.GetMinMaxT(*ray, &minT, &maxT)) 1190 continue; 1191 if (minT < 0) // start ray from origin 1192 minT = 0;*/ 1193 1194 // bound ray 1195 if ((ray->GetType() == Ray::LOCAL_RAY) && 1196 (!ray->intersections.empty()) && 1197 (ray->intersections[0].mT <= maxT)) 1198 { 1199 maxT = ray->intersections[0].mT; 1200 } 1201 1202 int classification = ray->ClassifyPlane(candidatePlane, minT, maxT); 1203 1187 1204 if (sSplitPlaneStrategy & LEAST_RAY_SPLITS) 1188 1205 { 1189 } 1190 1206 sumBalancedRays += sBalancedTreeTable[classification]; 1207 } 1208 1191 1209 if (sSplitPlaneStrategy & BALANCED_RAYS) 1192 1210 { 1211 sumRaySplits += sLeastSplitsTable[classification]; 1193 1212 } 1194 1213 } -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r335 r336 635 635 contribution for a minimum number splits in the tree. 636 636 */ 637 static float sBalanced PolysTable[4];637 static float sBalancedTreeTable[4]; 638 638 }; 639 639
Note: See TracChangeset
for help on using the changeset viewer.