From 667fe1169439a3d914bed98d926c1bed93ff49d8 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 25 Apr 2013 17:29:56 -0700 Subject: [PATCH] added VoxelNode::printDebugDetails() --- libraries/voxels/src/VoxelNode.cpp | 8 ++++++++ libraries/voxels/src/VoxelNode.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/libraries/voxels/src/VoxelNode.cpp b/libraries/voxels/src/VoxelNode.cpp index 9168a722ba..6ef82d9ea0 100644 --- a/libraries/voxels/src/VoxelNode.cpp +++ b/libraries/voxels/src/VoxelNode.cpp @@ -191,6 +191,14 @@ bool VoxelNode::isLeaf() const { return (0 == childCount); } +void VoxelNode::printDebugDetails(const char* label) const { + AABox box; + getAABox(box); + printf("%s - Voxel at corner=(%f,%f,%f) size=%f octcode=",label, + box.getCorner().x, box.getCorner().y, box.getCorner().z,box.getSize().x); + printOctalCode(octalCode); +} + bool VoxelNode::isInView(const ViewFrustum& viewFrustum) const { AABox box; diff --git a/libraries/voxels/src/VoxelNode.h b/libraries/voxels/src/VoxelNode.h index 406b753e96..a8c0a1e00b 100644 --- a/libraries/voxels/src/VoxelNode.h +++ b/libraries/voxels/src/VoxelNode.h @@ -60,6 +60,8 @@ public: bool isLeaf() const; void getAABox(AABox& box) const; + + void printDebugDetails(const char* label) const; }; #endif /* defined(__hifi__VoxelNode__) */