added some debugging

This commit is contained in:
ZappoMan 2013-11-21 13:51:40 -08:00
parent e2e9c29824
commit 9784288b63
2 changed files with 17 additions and 10 deletions

View file

@ -1110,6 +1110,8 @@ int VoxelTree::encodeTreeBitstream(VoxelNode* node,
doneEncoding(node); doneEncoding(node);
// debug compare the buffer to the packet... // debug compare the buffer to the packet...
bool debug = false;
if (debug) {
printf("encodeTreeBitstream()... bytesWritten=%d\n",bytesWritten); printf("encodeTreeBitstream()... bytesWritten=%d\n",bytesWritten);
printf(" originalOutputBuffer...\n"); printf(" originalOutputBuffer...\n");
outputBufferBits(originalOutputBuffer, bytesWritten); outputBufferBits(originalOutputBuffer, bytesWritten);
@ -1120,6 +1122,7 @@ int VoxelTree::encodeTreeBitstream(VoxelNode* node,
} else { } else {
printf("... they DO NOT MATCH!!!!! ...\n"); printf("... they DO NOT MATCH!!!!! ...\n");
} }
}
return bytesWritten; return bytesWritten;
} }

View file

@ -45,6 +45,7 @@ void voxelTutorial(VoxelTree * tree) {
node->getColor()[0], node->getColor()[1], node->getColor()[2]); node->getColor()[0], node->getColor()[1], node->getColor()[2]);
} }
/***
// here's an example of how to delete a voxel // here's an example of how to delete a voxel
printf("attempting to delete corner point 0,0,0\n"); printf("attempting to delete corner point 0,0,0\n");
tree->deleteVoxelAt(0, 0, 0, voxelSize); tree->deleteVoxelAt(0, 0, 0, voxelSize);
@ -55,6 +56,7 @@ void voxelTutorial(VoxelTree * tree) {
} else { } else {
printf("corner point 0,0,0 does not exists...\n"); printf("corner point 0,0,0 does not exists...\n");
} }
***/
} }
@ -350,7 +352,9 @@ int main(int argc, const char * argv[])
unsigned long nodeCount = myTree.getVoxelCount(); unsigned long nodeCount = myTree.getVoxelCount();
printf("Nodes after adding scenes: %ld nodes\n", nodeCount); printf("Nodes after adding scenes: %ld nodes\n", nodeCount);
printf("BEFORE writeToSVOFile()\n");
myTree.writeToSVOFile("voxels.svo"); myTree.writeToSVOFile("voxels.svo");
printf("AFTER writeToSVOFile()\n");
} }
return 0; return 0;