Changeset 711 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 03/20/06 16:55:40 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r710 r711 1055 1055 // subdivide further 1056 1056 1057 // store maximal and minimal depth 1058 if (tData.mDepth > mBspStats.maxDepth) 1059 { 1060 Debug << "max depth increases to " << tData.mDepth << " at " << mBspStats.Leaves() << " leaves" << endl; 1061 mBspStats.maxDepth = tData.mDepth; 1062 } 1063 1057 1064 mBspStats.nodes += 2; 1058 1065 1059 1066 1060 1067 BspInterior *interior = new BspInterior(splitPlane); 1061 1068 … … 1064 1071 #endif 1065 1072 1073 1066 1074 //-- create front and back leaf 1067 1075 … … 1087 1095 interior->mTimeStamp = mTimeStamp ++; 1088 1096 1097 1089 1098 //DEL_PTR(leaf); 1090 1099 return interior; … … 1142 1151 // creates a sorted split candidates array 1143 1152 if (mSplitCandidates->capacity() > 500000 && 1144 requestedSize < (int)(mSplitCandidates->capacity() 1153 requestedSize < (int)(mSplitCandidates->capacity() / 10) ) 1145 1154 { 1146 1155 delete mSplitCandidates; … … 1851 1860 pBack = pOverall - pFront; 1852 1861 1853 // clamp because of possible precision issues1862 // precision issues possible for unbalanced split => don't take this split! 1854 1863 if (1 && 1855 1864 (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) || … … 1857 1866 { 1858 1867 Debug << "error f: " << pFront << " b: " << pBack << endl; 1859 return 999 ;1868 return 99999.9f; 1860 1869 } 1861 1870 } … … 2167 2176 BspLeaf *leaf = dynamic_cast<BspLeaf *>(data.mNode); 2168 2177 2169 // store maximal and minimal depth2170 if (data.mDepth > mBspStats.maxDepth)2171 mBspStats.maxDepth = data.mDepth;2172 2178 2173 2179 if (data.mPvs > mBspStats.maxPvs) 2180 { 2174 2181 mBspStats.maxPvs = data.mPvs; 2175 2182 } 2183 2176 2184 mBspStats.pvs += data.mPvs; 2177 2185 2178 2186 if (data.mDepth < mBspStats.minDepth) 2187 { 2179 2188 mBspStats.minDepth = data.mDepth; 2189 } 2180 2190 2181 2191 if (data.mDepth >= mTermMaxDepth) 2192 { 2182 2193 ++ mBspStats.maxDepthNodes; 2194 } 2183 2195 2184 2196 // accumulate rays to compute rays / leaf
Note: See TracChangeset
for help on using the changeset viewer.