mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
added some debugging
This commit is contained in:
parent
e2e9c29824
commit
9784288b63
2 changed files with 17 additions and 10 deletions
|
@ -1110,17 +1110,20 @@ int VoxelTree::encodeTreeBitstream(VoxelNode* node,
|
|||
doneEncoding(node);
|
||||
|
||||
// debug compare the buffer to the packet...
|
||||
printf("encodeTreeBitstream()... bytesWritten=%d\n",bytesWritten);
|
||||
printf(" originalOutputBuffer...\n");
|
||||
outputBufferBits(originalOutputBuffer, bytesWritten);
|
||||
printf(" packet...\n");
|
||||
outputBufferBits(packet->getStartOfBuffer(), bytesWritten);
|
||||
if (memcmp(originalOutputBuffer, packet->getStartOfBuffer(), bytesWritten) == 0) {
|
||||
printf("... they MATCH ...\n");
|
||||
} else {
|
||||
printf("... they DO NOT MATCH!!!!! ...\n");
|
||||
bool debug = false;
|
||||
if (debug) {
|
||||
printf("encodeTreeBitstream()... bytesWritten=%d\n",bytesWritten);
|
||||
printf(" originalOutputBuffer...\n");
|
||||
outputBufferBits(originalOutputBuffer, bytesWritten);
|
||||
printf(" packet...\n");
|
||||
outputBufferBits(packet->getStartOfBuffer(), bytesWritten);
|
||||
if (memcmp(originalOutputBuffer, packet->getStartOfBuffer(), bytesWritten) == 0) {
|
||||
printf("... they MATCH ...\n");
|
||||
} else {
|
||||
printf("... they DO NOT MATCH!!!!! ...\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ void voxelTutorial(VoxelTree * tree) {
|
|||
node->getColor()[0], node->getColor()[1], node->getColor()[2]);
|
||||
}
|
||||
|
||||
/***
|
||||
// here's an example of how to delete a voxel
|
||||
printf("attempting to delete corner point 0,0,0\n");
|
||||
tree->deleteVoxelAt(0, 0, 0, voxelSize);
|
||||
|
@ -55,6 +56,7 @@ void voxelTutorial(VoxelTree * tree) {
|
|||
} else {
|
||||
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();
|
||||
printf("Nodes after adding scenes: %ld nodes\n", nodeCount);
|
||||
|
||||
printf("BEFORE writeToSVOFile()\n");
|
||||
myTree.writeToSVOFile("voxels.svo");
|
||||
printf("AFTER writeToSVOFile()\n");
|
||||
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue