Showing the changes to interface/src/VoxelSystem.cpp (1 of 14 files). Show all
Unified · Split
| @@ -429,7 +429,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 428 unmodified lines | ||
| 429 | 429 | bool shouldRender = false; // assume we don't need to render it |
| 430 | 430 | // if it's colored, we might need to render it! |
| 431 | 431 | shouldRender = node->calculateShouldRender(_viewFrustum); |
| 432 | − | |
| 432 | + | |
| 433 | 433 | node->setShouldRender(shouldRender); |
| 434 | 434 | // let children figure out their renderness |
| 435 | 435 | if (!node->isLeaf()) { |
| @@ -646,6 +646,18 @@ void VoxelSystem::init() { · 210 unmodified lines | ||
| 646 | 646 | _initialized = true; |
| 647 | 647 | } |
| 648 | 648 | |
| 649 | +void VoxelSystem::changeTree(VoxelTree* newTree) { | |
| 650 | + disconnect(_tree, 0, this, 0); | |
| 651 | + | |
| 652 | + _tree = newTree; | |
| 653 | + _tree->setDirtyBit(); | |
| 654 | + | |
| 655 | + connect(_tree, SIGNAL(importSize(float,float,float)), SIGNAL(importSize(float,float,float))); | |
| 656 | + connect(_tree, SIGNAL(importProgress(int)), SIGNAL(importProgress(int))); | |
| 657 | + | |
| 658 | + setupNewVoxelsForDrawing(); | |
| 659 | +} | |
| 660 | + | |
| 649 | 661 | void VoxelSystem::updateFullVBOs() { |
| 650 | 662 | updateVBOSegment(0, _voxelsInReadArrays); |
| 651 | 663 | |