mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 03:01:52 +02:00
Added possibility to create a VoxelSystem from an already existing VoxelTree
This commit is contained in:
parent
4bcb43f7dd
commit
ea0f414c23
2 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ GLubyte identityIndicesRight[] = { 1, 2, 6, 1, 6, 5 };
|
|||
GLubyte identityIndicesFront[] = { 0, 2, 1, 0, 3, 2 };
|
||||
GLubyte identityIndicesBack[] = { 4, 5, 6, 4, 6, 7 };
|
||||
|
||||
VoxelSystem::VoxelSystem(float treeScale, int maxVoxels)
|
||||
VoxelSystem::VoxelSystem(float treeScale, int maxVoxels, VoxelTree* tree)
|
||||
: NodeData(),
|
||||
_treeScale(treeScale),
|
||||
_maxVoxels(maxVoxels),
|
||||
|
@ -71,7 +71,7 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels)
|
|||
_voxelsInReadArrays = _voxelsInWriteArrays = _voxelsUpdated = 0;
|
||||
_writeRenderFullVBO = true;
|
||||
_readRenderFullVBO = true;
|
||||
_tree = new VoxelTree();
|
||||
_tree = (tree) ? tree : new VoxelTree();
|
||||
|
||||
_tree->getRoot()->setVoxelSystem(this);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class VoxelSystem : public NodeData, public OctreeElementDeleteHook, public Octr
|
|||
friend class VoxelHideShowThread;
|
||||
|
||||
public:
|
||||
VoxelSystem(float treeScale = TREE_SCALE, int maxVoxels = DEFAULT_MAX_VOXELS_PER_SYSTEM);
|
||||
VoxelSystem(float treeScale = TREE_SCALE, int maxVoxels = DEFAULT_MAX_VOXELS_PER_SYSTEM, VoxelTree* tree = NULL);
|
||||
~VoxelSystem();
|
||||
|
||||
void setDataSourceUUID(const QUuid& dataSourceUUID) { _dataSourceUUID = dataSourceUUID; }
|
||||
|
|
Loading…
Reference in a new issue