Showing the changes to interface/src/VoxelSystem.cpp (1 of 11 files). Show all
Unified · Split
| @@ -139,8 +139,9 @@ void VoxelSystem::voxelUpdated(VoxelNode* node) { · 138 unmodified lines | |||
| 139 | if (node->getVoxelSystem() == this) { | 139 | if (node->getVoxelSystem() == this) { |
| 140 | bool shouldRender = false; // assume we don't need to render it | 140 | bool shouldRender = false; // assume we don't need to render it |
| 141 | // if it's colored, we might need to render it! | 141 | // if it's colored, we might need to render it! |
| 142 | float voxelSizeScale = DEFAULT_VOXEL_SIZE_SCALE; | 142 | float voxelSizeScale = Menu::getInstance()->getVoxelSizeScale(); |
| 143 | shouldRender = node->calculateShouldRender(_viewFrustum, voxelSizeScale); | 143 | int boundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); |
| 144 | shouldRender = node->calculateShouldRender(_viewFrustum, voxelSizeScale, boundaryLevelAdjust); | ||
| 144 | 145 | ||
| 145 | if (node->getShouldRender() != shouldRender) { | 146 | if (node->getShouldRender() != shouldRender) { |
| 146 | node->setShouldRender(shouldRender); | 147 | node->setShouldRender(shouldRender); |
| @@ -924,8 +925,9 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 777 unmodified lines | |||
| 924 | int voxelsUpdated = 0; | 925 | int voxelsUpdated = 0; |
| 925 | bool shouldRender = false; // assume we don't need to render it | 926 | bool shouldRender = false; // assume we don't need to render it |
| 926 | // if it's colored, we might need to render it! | 927 | // if it's colored, we might need to render it! |
| 927 | float voxelSizeScale = DEFAULT_VOXEL_SIZE_SCALE; | 928 | float voxelSizeScale = Menu::getInstance()->getVoxelSizeScale();; |
| 928 | shouldRender = node->calculateShouldRender(_viewFrustum, voxelSizeScale); | 929 | int boundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); |
| 930 | shouldRender = node->calculateShouldRender(_viewFrustum, voxelSizeScale, boundaryLevelAdjust); | ||
| 929 | 931 | ||
| 930 | node->setShouldRender(shouldRender); | 932 | node->setShouldRender(shouldRender); |
| 931 | // let children figure out their renderness | 933 | // let children figure out their renderness |
| @@ -1386,6 +1388,10 @@ void VoxelSystem::killLocalVoxels() { · 454 unmodified lines | |||
| 1386 | setupNewVoxelsForDrawing(); | 1388 | setupNewVoxelsForDrawing(); |
| 1387 | } | 1389 | } |
| 1388 | 1390 | ||
| 1391 | void VoxelSystem::redrawInViewVoxels() { | ||
| 1392 | hideOutOfView(true); | ||
| 1393 | } | ||
| 1394 | |||
| 1389 | 1395 | ||
| 1390 | bool VoxelSystem::clearAllNodesBufferIndexOperation(VoxelNode* node, void* extraData) { | 1396 | bool VoxelSystem::clearAllNodesBufferIndexOperation(VoxelNode* node, void* extraData) { |
| 1391 | _nodeCount++; | 1397 | _nodeCount++; |
| @@ -1773,8 +1779,9 @@ bool VoxelSystem::showAllLocalVoxelsOperation(VoxelNode* node, void* extraData) · 381 unmodified lines | |||
| 1773 | 1779 | ||
| 1774 | args->nodesScanned++; | 1780 | args->nodesScanned++; |
| 1775 | 1781 | ||
| 1776 | float voxelSizeScale = DEFAULT_VOXEL_SIZE_SCALE; | 1782 | float voxelSizeScale = Menu::getInstance()->getVoxelSizeScale();; |
| 1777 | bool shouldRender = node->calculateShouldRender(&args->thisViewFrustum, voxelSizeScale); | 1783 | int boundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); |
| 1784 | bool shouldRender = node->calculateShouldRender(&args->thisViewFrustum, voxelSizeScale, boundaryLevelAdjust); | ||
| 1778 | node->setShouldRender(shouldRender); | 1785 | node->setShouldRender(shouldRender); |
| 1779 | 1786 | ||
| 1780 | if (shouldRender) { | 1787 | if (shouldRender) { |
| @@ -1950,8 +1957,9 @@ bool VoxelSystem::showAllSubTreeOperation(VoxelNode* node, void* extraData) { · 169 unmodified lines | |||
| 1950 | 1957 | ||
| 1951 | args->nodesInside++; | 1958 | args->nodesInside++; |
| 1952 | 1959 | ||
| 1953 | float voxelSizeScale = DEFAULT_VOXEL_SIZE_SCALE; | 1960 | float voxelSizeScale = Menu::getInstance()->getVoxelSizeScale(); |
| 1954 | bool shouldRender = node->calculateShouldRender(&args->thisViewFrustum, voxelSizeScale); | 1961 | int boundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); |
| 1962 | bool shouldRender = node->calculateShouldRender(&args->thisViewFrustum, voxelSizeScale, boundaryLevelAdjust); | ||
| 1955 | node->setShouldRender(shouldRender); | 1963 | node->setShouldRender(shouldRender); |
| 1956 | 1964 | ||
| 1957 | if (shouldRender && !node->isKnownBufferIndex()) { | 1965 | if (shouldRender && !node->isKnownBufferIndex()) { |