From 4f3872c18fb696863cfbe20c71a4f84e2c0a49ad Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 4 Jun 2013 01:13:58 -0700 Subject: [PATCH] CR feedback --- interface/src/Application.cpp | 4 ++-- interface/src/VoxelSystem.cpp | 8 ++++---- interface/src/VoxelSystem.h | 4 ++-- libraries/voxels/src/VoxelTree.cpp | 4 ++-- libraries/voxels/src/VoxelTree.h | 4 ++-- voxel-edit/src/main.cpp | 2 +- voxel-server/src/main.cpp | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 00772e7fec..4610d889ed 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1351,7 +1351,7 @@ void Application::exportVoxels() { if (selectedNode) { VoxelTree exportTree; _voxels.copySubTreeIntoNewTree(selectedNode, &exportTree, true); - exportTree.writeToFileV2(fileName); + exportTree.writeToSVOFile(fileName); } // restore the main window's active state @@ -1366,7 +1366,7 @@ void Application::importVoxels() { // Read the file into a tree VoxelTree importVoxels; - importVoxels.readFromFileV2(fileName); + importVoxels.readFromSVOFile(fileName); VoxelNode* selectedNode = _voxels.getVoxelAt(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s); diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index b99519e845..11c274119b 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -70,12 +70,12 @@ void VoxelSystem::loadVoxelsFile(const char* fileName, bool wantColorRandomizer) setupNewVoxelsForDrawing(); } -void VoxelSystem::writeToFileV2(const char* filename, VoxelNode* node) const { - _tree->writeToFileV2(filename, node); +void VoxelSystem::writeToSVOFile(const char* filename, VoxelNode* node) const { + _tree->writeToSVOFile(filename, node); } -bool VoxelSystem::readFromFileV2(const char* filename, VoxelNode* node) { - bool result = _tree->readFromFileV2(filename, node); +bool VoxelSystem::readFromSVOFile(const char* filename) { + bool result = _tree->readFromSVOFile(filename); if (result) { setupNewVoxelsForDrawing(); } diff --git a/interface/src/VoxelSystem.h b/interface/src/VoxelSystem.h index c15ba53ba0..ee63801f92 100644 --- a/interface/src/VoxelSystem.h +++ b/interface/src/VoxelSystem.h @@ -44,8 +44,8 @@ public: void setViewerAvatar(Avatar *newViewerAvatar) { _viewerAvatar = newViewerAvatar; }; void setCamera(Camera* newCamera) { _camera = newCamera; }; void loadVoxelsFile(const char* fileName,bool wantColorRandomizer); - void writeToFileV2(const char* filename, VoxelNode* node) const; - bool readFromFileV2(const char* filename, VoxelNode* node); + void writeToSVOFile(const char* filename, VoxelNode* node) const; + bool readFromSVOFile(const char* filename); long int getVoxelsCreated(); long int getVoxelsColored(); diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index 96c9320edd..49d79141de 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -1123,7 +1123,7 @@ int VoxelTree::encodeTreeBitstreamRecursion(int maxEncodeLevel, int& currentEnco return bytesAtThisLevel; } -bool VoxelTree::readFromFileV2(const char* fileName, VoxelNode* node) { +bool VoxelTree::readFromSVOFile(const char* fileName) { std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate); if(file.is_open()) { printLog("loading file %s...\n", fileName); @@ -1144,7 +1144,7 @@ bool VoxelTree::readFromFileV2(const char* fileName, VoxelNode* node) { return false; } -void VoxelTree::writeToFileV2(const char* fileName, VoxelNode* node) const { +void VoxelTree::writeToSVOFile(const char* fileName, VoxelNode* node) const { std::ofstream file(fileName, std::ios::out|std::ios::binary); diff --git a/libraries/voxels/src/VoxelTree.h b/libraries/voxels/src/VoxelTree.h index a2302f6cc7..b63e6eb738 100644 --- a/libraries/voxels/src/VoxelTree.h +++ b/libraries/voxels/src/VoxelTree.h @@ -92,8 +92,8 @@ public: void loadVoxelsFile(const char* fileName, bool wantColorRandomizer); // these will read/write files that match the wireformat, excluding the 'V' leading - void writeToFileV2(const char* filename, VoxelNode* node = NULL) const; - bool readFromFileV2(const char* filename, VoxelNode* node = NULL); + void writeToSVOFile(const char* filename, VoxelNode* node = NULL) const; + bool readFromSVOFile(const char* filename); unsigned long getVoxelCount(); diff --git a/voxel-edit/src/main.cpp b/voxel-edit/src/main.cpp index d2c88812ca..9571e4adf5 100644 --- a/voxel-edit/src/main.cpp +++ b/voxel-edit/src/main.cpp @@ -92,7 +92,7 @@ int main(int argc, const char * argv[]) unsigned long nodeCount = myTree.getVoxelCount(); printf("Nodes after adding scenes: %ld nodes\n", nodeCount); - myTree.writeToFileV2("voxels.svo"); + myTree.writeToSVOFile("voxels.svo"); } return 0; diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index 4d06f60f0c..9bf4a1dcc4 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -399,10 +399,10 @@ void persistVoxelsWhenDirty() { { PerformanceWarning warn(::shouldShowAnimationDebug, - "persistVoxelsWhenDirty() - writeToFileV2()", ::shouldShowAnimationDebug); + "persistVoxelsWhenDirty() - writeToSVOFile()", ::shouldShowAnimationDebug); printf("saving voxels to file...\n"); - randomTree.writeToFileV2(::wantLocalDomain ? LOCAL_VOXELS_PERSIST_FILE : VOXELS_PERSIST_FILE); + randomTree.writeToSVOFile(::wantLocalDomain ? LOCAL_VOXELS_PERSIST_FILE : VOXELS_PERSIST_FILE); randomTree.clearDirtyBit(); // tree is clean after saving printf("DONE saving voxels to file...\n"); } @@ -505,7 +505,7 @@ int main(int argc, const char * argv[]) { bool persistantFileRead = false; if (::wantVoxelPersist) { printf("loading voxels from file...\n"); - persistantFileRead = ::randomTree.readFromFileV2(::wantLocalDomain ? LOCAL_VOXELS_PERSIST_FILE : VOXELS_PERSIST_FILE); + persistantFileRead = ::randomTree.readFromSVOFile(::wantLocalDomain ? LOCAL_VOXELS_PERSIST_FILE : VOXELS_PERSIST_FILE); ::randomTree.clearDirtyBit(); // the tree is clean since we just loaded it printf("DONE loading voxels from file... fileRead=%s\n", debug::valueOf(persistantFileRead)); unsigned long nodeCount = ::randomTree.getVoxelCount(); @@ -517,7 +517,7 @@ int main(int argc, const char * argv[]) { const char* INPUT_FILE = "-i"; const char* voxelsFilename = getCmdOption(argc, argv, INPUT_FILE); if (voxelsFilename) { - randomTree.readFromFileV2(voxelsFilename); + randomTree.readFromSVOFile(voxelsFilename); } // Check to see if the user passed in a command line option for setting packet send rate