From b66c346f202fb254d551bc8da7bc941722d6f42d Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 2 Mar 2014 12:19:50 -0800 Subject: [PATCH] more cruft removal --- interface/src/VoxelSystem.cpp | 5 ----- interface/src/VoxelSystem.h | 1 - libraries/voxels/src/SceneUtils.cpp | 12 ------------ libraries/voxels/src/VoxelTree.cpp | 13 ------------- libraries/voxels/src/VoxelTree.h | 14 -------------- 5 files changed, 45 deletions(-) diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index 449efa2b58..6155ebdcd4 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -2347,11 +2347,6 @@ void VoxelSystem::createVoxel(float x, float y, float z, float s, setupNewVoxelsForDrawing(); }; -void VoxelSystem::createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive) { - _tree->createLine(point1, point2, unitSize, color, destructive); - setupNewVoxelsForDrawing(); -}; - void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) { _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot); destination->setupNewVoxelsForDrawing(); diff --git a/interface/src/VoxelSystem.h b/interface/src/VoxelSystem.h index cdb27bca3f..113c341ecc 100644 --- a/interface/src/VoxelSystem.h +++ b/interface/src/VoxelSystem.h @@ -97,7 +97,6 @@ public: VoxelTreeElement* getVoxelAt(float x, float y, float z, float s) const; void createVoxel(float x, float y, float z, float s, unsigned char red, unsigned char green, unsigned char blue, bool destructive = false); - void createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive = false); void copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destinationTree, bool rebaseToRoot); void copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelTree* destinationTree, bool rebaseToRoot); diff --git a/libraries/voxels/src/SceneUtils.cpp b/libraries/voxels/src/SceneUtils.cpp index 431f4bd042..2cbe73c74e 100644 --- a/libraries/voxels/src/SceneUtils.cpp +++ b/libraries/voxels/src/SceneUtils.cpp @@ -27,18 +27,6 @@ void addCornersAndAxisLines(VoxelTree* tree) { tree->createVoxel(1.0 - voxelSize, 1.0 - voxelSize, 0 , voxelSize, 255, 255 ,0 ); tree->createVoxel(1.0 - voxelSize, 1.0 - voxelSize, 1.0 - voxelSize, voxelSize, 255, 255 ,255); printf("DONE creating corner points...\n"); - - // Now some more examples... creating some lines using the line primitive - printf("creating voxel lines...\n"); - // We want our line voxels to be about 1/32 meter high, and our TREE_SCALE is in meters, so... - float lineVoxelSize = 1.f / (32 * TREE_SCALE); - rgbColor red = {255, 0, 0}; - rgbColor green = {0, 255, 0}; - rgbColor blue = {0, 0, 255}; - tree->createLine(glm::vec3(0, 0, 0), glm::vec3(0, 0, 1), lineVoxelSize, blue); - tree->createLine(glm::vec3(0, 0, 0), glm::vec3(1, 0, 0), lineVoxelSize, red); - tree->createLine(glm::vec3(0, 0, 0), glm::vec3(0, 1, 0), lineVoxelSize, green); - printf("DONE creating lines...\n"); } void addSurfaceScene(VoxelTree * tree) { diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index 08ec2cfc3c..272668a19e 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -56,19 +56,6 @@ void VoxelTree::createVoxel(float x, float y, float z, float s, delete[] voxelData; } - -void VoxelTree::createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive) { - glm::vec3 distance = point2 - point1; - glm::vec3 items = distance / unitSize; - int maxItems = std::max(items.x, std::max(items.y, items.z)); - glm::vec3 increment = distance * (1.0f/ maxItems); - glm::vec3 pointAt = point1; - for (int i = 0; i <= maxItems; i++ ) { - pointAt += increment; - createVoxel(pointAt.x, pointAt.y, pointAt.z, unitSize, color[0], color[1], color[2], destructive); - } -} - class NodeChunkArgs { public: VoxelTree* thisVoxelTree; diff --git a/libraries/voxels/src/VoxelTree.h b/libraries/voxels/src/VoxelTree.h index fc85e0184a..388b71bfca 100644 --- a/libraries/voxels/src/VoxelTree.h +++ b/libraries/voxels/src/VoxelTree.h @@ -12,8 +12,6 @@ #include #include "VoxelTreeElement.h" -//#include "VoxelPacketData.h" -//#include "VoxelSceneStats.h" #include "VoxelEditPacketSender.h" class ReadCodeColorBufferToTreeArgs; @@ -32,11 +30,8 @@ public: void createVoxel(float x, float y, float z, float s, unsigned char red, unsigned char green, unsigned char blue, bool destructive = false); - void createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive = false); - void nudgeSubTree(VoxelTreeElement* elementToNudge, const glm::vec3& nudgeAmount, VoxelEditPacketSender& voxelEditSender); - /// reads voxels from square image with alpha as a Y-axis bool readFromSquareARGB32Pixels(const char *filename); @@ -51,15 +46,6 @@ public: const unsigned char* editData, int maxLength, const SharedNodePointer& node); void processSetVoxelsBitstream(const unsigned char* bitstream, int bufferSizeBytes); -/** -signals: - void importSize(float x, float y, float z); - void importProgress(int progress); - -public slots: - void cancelImport(); -**/ - private: // helper functions for nudgeSubTree void recurseNodeForNudge(VoxelTreeElement* element, RecurseOctreeOperation operation, void* extraData);