mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
removed more VoxelSystem wrappers, call VoxelTree directly
This commit is contained in:
parent
f0e73d2f98
commit
5f6a60e786
3 changed files with 3 additions and 25 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue