Changeset 1076 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 07/05/06 10:43:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r1074 r1076 629 629 630 630 631 // first node is kd node, i.e. an axis aligned box 632 if (1) 633 tData.mIsKdNode = true; 634 else 635 tData.mIsKdNode = false; 636 631 637 // compute first split candidate 632 638 VspBspSplitCandidate splitCandidate; … … 793 799 // if it was a kd node (i.e., a box) and the split axis is axis aligned, it is still a kd node 794 800 tFrontData.mIsKdNode = tBackData.mIsKdNode = (tData.mIsKdNode && (splitAxis < 3)); 801 795 802 tFrontData.mAxis = tBackData.mAxis = splitAxis; 796 803 … … 1539 1546 //Debug << "use special axis: " << useSpecialAxis << endl; 1540 1547 //Debug << "axis: " << sAxis << " drivingaxis: " << box.Size().DrivingAxis(); 1541 1548 1542 1549 for (axis = 0; axis < 3 ; ++ axis) 1543 1550 { … … 1560 1567 nPosition[axis] = (box.Min()[axis] + box.Max()[axis]) * 0.5f; 1561 1568 Vector3 normal(0,0,0); normal[axis] = 1.0f; 1562 1569 1563 1570 // allows faster split because we have axis aligned kd tree boxes 1564 1571 if (isKdNode) … … 2262 2269 2263 2270 2264 void VspBspTree::AddObjToPvs(Intersectable *obj,2265 const int cf,2266 float &frontPvs,2267 float &backPvs,2268 float &totalPvs) const2271 inline void VspBspTree::AddObjToPvs(Intersectable *obj, 2272 const int cf, 2273 float &frontPvs, 2274 float &backPvs, 2275 float &totalPvs) const 2269 2276 { 2270 2277 if (!obj) 2271 2278 return; 2272 2279 #if 0 2273 2280 const float renderCost = mViewCellsManager->EvalRenderCost(obj); 2274 2281 #else 2282 const int renderCost = 1; 2283 #endif 2275 2284 // new object 2276 2285 if ((obj->mMailbox != sFrontId) &&
Note: See TracChangeset
for help on using the changeset viewer.