CR feedback

This commit is contained in:
ZappoMan 2013-06-04 01:13:58 -07:00
parent 37cc436b2b
commit 4f3872c18f
7 changed files with 17 additions and 17 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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