History

merge

atlante45 committed 13 years ago

Commit b8c18be2 parents 5da525f f0bb42a14 files · +192 −151Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+13−1
@@ -429,7 +429,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 428 unmodified lines
429429 bool shouldRender = false; // assume we don't need to render it
430430 // if it's colored, we might need to render it!
431431 shouldRender = node->calculateShouldRender(_viewFrustum);
432−
432+
433433 node->setShouldRender(shouldRender);
434434 // let children figure out their renderness
435435 if (!node->isLeaf()) {
@@ -646,6 +646,18 @@ void VoxelSystem::init() { · 210 unmodified lines
646646 _initialized = true;
647647 }
648648
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+
649661 void VoxelSystem::updateFullVBOs() {
650662 updateVBOSegment(0, _voxelsInReadArrays);
651663