Showing the changes to libraries/shared/src/TriangleSet.cpp (1 of 2 files). Show all
Unified · Split
| @@ -81,7 +81,7 @@ void TriangleSet::balanceOctree() { · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | // insert all the triangles | 82 | // insert all the triangles |
| 83 | 83 | ||
| 84 | for (int i = 0; i < _triangles.size(); i++) { | 84 | for (size_t i = 0; i < _triangles.size(); i++) { |
| 85 | _triangleOctree.insert(i); | 85 | _triangleOctree.insert(i); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| @@ -153,10 +153,6 @@ void TriangleSet::TriangleOctreeCell::reset(const AABox& bounds, int depth) { · 65 unmodified lines | |||
| 153 | clear(); | 153 | clear(); |
| 154 | _bounds = bounds; | 154 | _bounds = bounds; |
| 155 | _depth = depth; | 155 | _depth = depth; |
| 156 | if (depth <= MAX_DEPTH) { | ||
| 157 | int childDepth = depth + 1; | ||
| 158 | _children.clear(); | ||
| 159 | } | ||
| 160 | } | 156 | } |
| 161 | 157 | ||
| 162 | void TriangleSet::TriangleOctreeCell::debugDump() { | 158 | void TriangleSet::TriangleOctreeCell::debugDump() { |
| @@ -176,7 +172,7 @@ void TriangleSet::TriangleOctreeCell::debugDump() { · 13 unmodified lines | |||
| 176 | } | 172 | } |
| 177 | } | 173 | } |
| 178 | 174 | ||
| 179 | void TriangleSet::TriangleOctreeCell::insert(int triangleIndex) { | 175 | void TriangleSet::TriangleOctreeCell::insert(size_t triangleIndex) { |
| 180 | const Triangle& triangle = _allTriangles[triangleIndex]; | 176 | const Triangle& triangle = _allTriangles[triangleIndex]; |
| 181 | _population++; | 177 | _population++; |
| 182 | // if we're not yet at the max depth, then check which child the triangle fits in | 178 | // if we're not yet at the max depth, then check which child the triangle fits in |