more cruft removal

This commit is contained in:
ZappoMan 2014-03-02 12:19:50 -08:00
parent c5197b390e
commit b66c346f20
5 changed files with 0 additions and 45 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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) {

View file

@ -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;

View file

@ -12,8 +12,6 @@
#include <Octree.h>
#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);