diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index e194df403b..b018bd1f96 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -18,15 +18,10 @@ #include #include #include "Log.h" +#include "VoxelConstants.h" #include "VoxelSystem.h" -const int MAX_VOXELS_PER_SYSTEM = 250000; - -const int VERTICES_PER_VOXEL = 24; -const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL; -const int INDICES_PER_VOXEL = 3 * 12; - float identityVertices[] = { 0,0,0, 1,0,0, 1,1,0, 0,1,0, 0,0,1, 1,0,1, 1,1,1, 0,1,1, 0,0,0, 1,0,0, 1,1,0, 0,1,0, 0,0,1, 1,0,1, 1,1,1, 0,1,1, 0,0,0, 1,0,0, 1,1,0, 0,1,0, 0,0,1, 1,0,1, 1,1,1, 0,1,1 }; diff --git a/libraries/voxels/src/VoxelNode.cpp b/libraries/voxels/src/VoxelNode.cpp index de0940a0ee..6129f9c16c 100644 --- a/libraries/voxels/src/VoxelNode.cpp +++ b/libraries/voxels/src/VoxelNode.cpp @@ -12,9 +12,9 @@ #include "SharedUtil.h" #include "voxels_Log.h" #include "VoxelNode.h" +#include "VoxelConstants.h" #include "OctalCode.h" #include "AABox.h" - using voxels_lib::printLog; // using voxels_lib::printLog; diff --git a/libraries/voxels/src/VoxelNode.h b/libraries/voxels/src/VoxelNode.h index 4153f1ff88..4cda55f8a7 100644 --- a/libraries/voxels/src/VoxelNode.h +++ b/libraries/voxels/src/VoxelNode.h @@ -15,9 +15,6 @@ typedef unsigned char colorPart; typedef unsigned char nodeColor[4]; -const int TREE_SCALE = 10; - - class VoxelNode { private: nodeColor _trueColor; diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index b1f1d3e0a1..615f63df47 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -62,6 +62,7 @@ #include "VoxelNodeBag.h" #include "ViewFrustum.h" #include // to load voxels from file +#include "VoxelConstants.h" using voxels_lib::printLog; diff --git a/libraries/voxels/src/VoxelTree.h b/libraries/voxels/src/VoxelTree.h index 86b2c40d5e..05d6d39062 100644 --- a/libraries/voxels/src/VoxelTree.h +++ b/libraries/voxels/src/VoxelTree.h @@ -16,9 +16,6 @@ #include "VoxelNodeBag.h" #include "MarkerNode.h" -const int MAX_VOXEL_PACKET_SIZE = 1492; -const int MAX_TREE_SLICE_BYTES = 26; - // Callback function, for recuseTreeWithOperation typedef bool (*RecurseVoxelTreeOperation)(VoxelNode* node, bool down, void* extraData); diff --git a/voxel-server/src/VoxelAgentData.h b/voxel-server/src/VoxelAgentData.h index 3e3569379a..56d9ebf03e 100644 --- a/voxel-server/src/VoxelAgentData.h +++ b/voxel-server/src/VoxelAgentData.h @@ -14,7 +14,7 @@ #include #include "MarkerNode.h" #include "VoxelNodeBag.h" -#include "VoxelTree.h" // for MAX_VOXEL_PACKET_SIZE +#include "VoxelConstants.h" class VoxelAgentData : public AvatarData { public: diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index d1363afb2e..30eef7835f 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -29,9 +29,6 @@ const int VOXEL_LISTEN_PORT = 40106; -const int VERTICES_PER_VOXEL = 8; -const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL; -const int COLOR_VALUES_PER_VOXEL = 3 * VERTICES_PER_VOXEL; const int VOXEL_SIZE_BYTES = 3 + (3 * sizeof(float)); const int VOXELS_PER_PACKET = (MAX_PACKET_SIZE - 1) / VOXEL_SIZE_BYTES;