History

Added possibility to create a VoxelSystem from an already existing VoxelTree

Atlante45 committed 12 years ago

Commit ea0f4141 parent 4bcb43f2 files · +3 −3Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+2−2
@@ -55,7 +55,7 @@ GLubyte identityIndicesRight[] = { 1, 2, 6, 1, 6, 5 }; · 54 unmodified lines
55GLubyte identityIndicesFront[] = { 0, 2, 1, 0, 3, 2 };55GLubyte identityIndicesFront[] = { 0, 2, 1, 0, 3, 2 };
56GLubyte identityIndicesBack[] = { 4, 5, 6, 4, 6, 7 };56GLubyte identityIndicesBack[] = { 4, 5, 6, 4, 6, 7 };
57 57
58VoxelSystem::VoxelSystem(float treeScale, int maxVoxels)58VoxelSystem::VoxelSystem(float treeScale, int maxVoxels, VoxelTree* tree)
59 : NodeData(),59 : NodeData(),
60 _treeScale(treeScale),60 _treeScale(treeScale),
61 _maxVoxels(maxVoxels),61 _maxVoxels(maxVoxels),
@@ -71,7 +71,7 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels) · 9 unmodified lines
71 _voxelsInReadArrays = _voxelsInWriteArrays = _voxelsUpdated = 0;71 _voxelsInReadArrays = _voxelsInWriteArrays = _voxelsUpdated = 0;
72 _writeRenderFullVBO = true;72 _writeRenderFullVBO = true;
73 _readRenderFullVBO = true;73 _readRenderFullVBO = true;
74 _tree = new VoxelTree();74 _tree = (tree) ? tree : new VoxelTree();
75 75
76 _tree->getRoot()->setVoxelSystem(this);76 _tree->getRoot()->setVoxelSystem(this);
77 77