Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -591,7 +591,6 @@ void VoxelSystem::falseColorizeDistanceFromView(ViewFrustum* viewFrustum) { · 590 unmodified lines | |||
| 591 | 591 | ||
| 592 | // "Remove" voxels from the tree that are not in view. We don't actually delete them, | 592 | // "Remove" voxels from the tree that are not in view. We don't actually delete them, |
| 593 | // we remove them from the tree and place them into a holding area for later deletion | 593 | // we remove them from the tree and place them into a holding area for later deletion |
| 594 | int removedCount; | ||
| 595 | bool VoxelSystem::removeOutOfViewOperation(VoxelNode* node, void* extraData) { | 594 | bool VoxelSystem::removeOutOfViewOperation(VoxelNode* node, void* extraData) { |
| 596 | VoxelSystem* thisVoxelSystem = (VoxelSystem*) extraData; | 595 | VoxelSystem* thisVoxelSystem = (VoxelSystem*) extraData; |
| 597 | _nodeCount++; | 596 | _nodeCount++; |
| @@ -600,10 +599,6 @@ bool VoxelSystem::removeOutOfViewOperation(VoxelNode* node, void* extraData) { · 2 unmodified lines | |||
| 600 | VoxelNode* childNode = node->getChildAtIndex(i); | 599 | VoxelNode* childNode = node->getChildAtIndex(i); |
| 601 | if (childNode && !childNode->isInView(*thisVoxelSystem->_viewFrustum)) { | 600 | if (childNode && !childNode->isInView(*thisVoxelSystem->_viewFrustum)) { |
| 602 | node->removeChildAtIndex(i); | 601 | node->removeChildAtIndex(i); |
| 603 | removedCount++; | ||
| 604 | |||
| 605 | // Note: VoxelNodeBag is more expensive than we need, because it checks octal code matches, | ||
| 606 | // we really just want a simple bag that checks pointers only, consider switching | ||
| 607 | thisVoxelSystem->_removedVoxels.insert(childNode); | 602 | thisVoxelSystem->_removedVoxels.insert(childNode); |
| 608 | } | 603 | } |
| 609 | } | 604 | } |
| @@ -623,7 +618,6 @@ void VoxelSystem::removeOutOfView() { · 13 unmodified lines | |||
| 623 | PerformanceWarning warn(_renderWarningsOn, "removeOutOfView()"); // would like to include removedCount, _nodeCount, _removedVoxels.count() | 618 | PerformanceWarning warn(_renderWarningsOn, "removeOutOfView()"); // would like to include removedCount, _nodeCount, _removedVoxels.count() |
| 624 | pthread_mutex_lock(&_voxelCleanupLock); | 619 | pthread_mutex_lock(&_voxelCleanupLock); |
| 625 | _nodeCount = 0; | 620 | _nodeCount = 0; |
| 626 | removedCount = 0; | ||
| 627 | _tree->recurseTreeWithOperation(removeOutOfViewOperation,(void*)this); | 621 | _tree->recurseTreeWithOperation(removeOutOfViewOperation,(void*)this); |
| 628 | pthread_mutex_unlock(&_voxelCleanupLock); | 622 | pthread_mutex_unlock(&_voxelCleanupLock); |
| 629 | } | 623 | } |