Changeset 660 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 02/21/06 17:42:39 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r656 r660 129 129 environment->GetBoolValue("VspBspTree.useCostHeuristics", mUseCostHeuristics); 130 130 environment->GetBoolValue("VspBspTree.useSplitCostQueue", mUseSplitCostQueue); 131 132 char subdivisionStatsLog[100]; 133 environment->GetStringValue("BspTree.subdivisionStats", subdivisionStatsLog); 134 mSubdivisionStats.open(subdivisionStatsLog); 131 135 132 136 … … 556 560 geom); 557 561 562 // compute first split candidate 558 563 VspBspSplitCandidate splitCandidate; 559 560 561 564 EvalSplitCandidate(tData, splitCandidate); 562 565 … … 820 823 VspBspTraversalData tBackData; 821 824 822 #if OCTREE_HACK823 //Debug << "new axis:" << (tData.mAxis + 1) % 3 << endl;824 tFrontData.mAxis = (tData.mAxis + 1) % 3;825 tBackData.mAxis = (tData.mAxis + 1) % 3;826 #endif827 825 //-- continue subdivision 828 826 // create new interior node and two leaf node … … 831 829 newNode = SubdivideNode(splitPlane, tData, tFrontData, tBackData, coincident); 832 830 833 #if 0 // TODO 831 const int splitAxis = splitCandidate.mSplitAxis; 832 const int maxCostMisses = splitCandidate.mMaxCostMisses; 833 834 834 if (splitAxis < 3) 835 835 ++ mBspStats.splits[splitAxis]; … … 838 838 839 839 tFrontData.mIsKdNode = tBackData.mIsKdNode = (tData.mIsKdNode && splitAxis < 3); 840 840 841 // how often was max cost ratio missed in this branch? 841 842 tFrontData.mMaxCostMisses = maxCostMisses; 842 843 tBackData.mMaxCostMisses = maxCostMisses; 843 844 #endif 844 845 845 846 if (1) 846 847 { … … 936 937 937 938 // compute locally best split plane 938 SelectPlane(splitData.mSplitPlane, leaf, tData, frontData, backData, splitAxis);939 bool success = SelectPlane(splitData.mSplitPlane, leaf, tData, frontData, backData, splitAxis); 939 940 940 941 // TODO: reuse … … 945 946 splitData.mRenderCost = EvalRenderCostDecrease(splitData.mSplitPlane, tData); 946 947 splitData.mParentData = tData; 948 splitData.mMaxCostMisses = success ? tData.mMaxCostMisses : tData.mMaxCostMisses + 1; 947 949 } 948 950
Note: See TracChangeset
for help on using the changeset viewer.