From 5f6a60e78647f509713ac313bd84de4b933691e9 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 2 Mar 2014 16:40:27 -0800 Subject: [PATCH] removed more VoxelSystem wrappers, call VoxelTree directly --- interface/src/Application.cpp | 5 +++-- interface/src/VoxelSystem.cpp | 17 ----------------- interface/src/VoxelSystem.h | 6 ------ 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a9ef383e56..544b4ea535 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1373,7 +1373,7 @@ void Application::exportVoxels(const VoxelDetail& sourceVoxel) { VoxelTreeElement* selectedNode = _voxels.getTree()->getVoxelAt(sourceVoxel.x, sourceVoxel.y, sourceVoxel.z, sourceVoxel.s); if (selectedNode) { VoxelTree exportTree; - _voxels.copySubTreeIntoNewTree(selectedNode, &exportTree, true); + getVoxelTree()->copySubTreeIntoNewTree(selectedNode, &exportTree, true); exportTree.writeToSVOFile(fileName); } @@ -1417,7 +1417,8 @@ void Application::copyVoxels(const VoxelDetail& sourceVoxel) { // then copy onto it if there is something to copy VoxelTreeElement* selectedNode = _voxels.getTree()->getVoxelAt(sourceVoxel.x, sourceVoxel.y, sourceVoxel.z, sourceVoxel.s); if (selectedNode) { - _voxels.copySubTreeIntoNewTree(selectedNode, &_sharedVoxelSystem, true); + getVoxelTree()->copySubTreeIntoNewTree(selectedNode, _sharedVoxelSystem.getTree(), true); + _sharedVoxelSystem.forceRedrawEntireTree(); } } diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index c39f50c61f..ea73f91f26 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -2256,23 +2256,6 @@ bool VoxelSystem::hideOutOfViewOperation(OctreeElement* element, void* extraData } -void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) { - _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot); - destination->setupNewVoxelsForDrawing(); -} - -void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelTree* destination, bool rebaseToRoot) { - _tree->copySubTreeIntoNewTree(startNode, destination, rebaseToRoot); -} - -void VoxelSystem::copyFromTreeIntoSubTree(VoxelTree* sourceTree, VoxelTreeElement* destinationNode) { - _tree->copyFromTreeIntoSubTree(sourceTree, destinationNode); -} - -void VoxelSystem::recurseTreeWithOperation(RecurseOctreeOperation operation, void* extraData) { - _tree->recurseTreeWithOperation(operation, extraData); -} - void VoxelSystem::nodeAdded(SharedNodePointer node) { if (node->getType() == NodeType::VoxelServer) { qDebug("VoxelSystem... voxel server %s added...", node->getUUID().toString().toLocal8Bit().constData()); diff --git a/interface/src/VoxelSystem.h b/interface/src/VoxelSystem.h index 409fc9e740..fb7878154e 100644 --- a/interface/src/VoxelSystem.h +++ b/interface/src/VoxelSystem.h @@ -87,12 +87,6 @@ public: bool hasViewChanged(); bool isViewChanging(); - void copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destinationTree, bool rebaseToRoot); - void copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelTree* destinationTree, bool rebaseToRoot); - void copyFromTreeIntoSubTree(VoxelTree* sourceTree, VoxelTreeElement* destinationNode); - - void recurseTreeWithOperation(RecurseOctreeOperation operation, void* extraData=NULL); - virtual void elementDeleted(OctreeElement* element); virtual void elementUpdated(OctreeElement* element);