History

CR feedback

ZappoMan committed 13 years ago

Commit ddd55101 parent 6c84e901 file · +2 −3Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/VoxelSystem.cpp+2−3
@@ -292,7 +292,6 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 291 unmodified lines
292292 assert(_viewFrustum); // you must set up _viewFrustum before calling this
293293 int voxelsUpdated = 0;
294294 bool shouldRender = false; // assume we don't need to render it
295− bool isLeaf = node->isLeaf();
296295 // if it's colored, we might need to render it!
297296 if (node->isColored()) {
298297 float distanceToNode = node->distanceToCamera(*_viewFrustum);
@@ -300,11 +299,11 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 1 unmodified line
300299 float childBoundary = boundaryDistanceForRenderLevel(node->getLevel() + 1);
301300 bool inBoundary = (distanceToNode <= boundary);
302301 bool inChildBoundary = (distanceToNode <= childBoundary);
303− shouldRender = (isLeaf && inChildBoundary) || (inBoundary && !inChildBoundary);
302+ shouldRender = (node->isLeaf() && inChildBoundary) || (inBoundary && !inChildBoundary);
304303 }
305304 node->setShouldRender(shouldRender && !node->isStagedForDeletion());
306305 // let children figure out their renderness
307− if (!isLeaf) {
306+ if (!node->isLeaf()) {
308307 for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
309308 if (node->getChildAtIndex(i)) {
310309 voxelsUpdated += newTreeToArrays(node->getChildAtIndex(i));