adds reset of octree element population statistics

This commit is contained in:
ZappoMan 2014-03-27 02:31:39 -07:00
parent 56492e3ac8
commit c6c4b58699
2 changed files with 6 additions and 0 deletions

View file

@ -29,6 +29,11 @@ quint64 OctreeElement::_externalChildrenMemoryUsage = 0;
quint64 OctreeElement::_voxelNodeCount = 0;
quint64 OctreeElement::_voxelNodeLeafCount = 0;
void OctreeElement::resetPopulationStatistics() {
_voxelNodeCount = 0;
_voxelNodeLeafCount = 0;
}
OctreeElement::OctreeElement() {
// Note: you must call init() from your subclass, otherwise the OctreeElement will not be properly
// initialized. You will see DEADBEEF in your memory debugger if you have not properly called init()

View file

@ -152,6 +152,7 @@ public:
static void addUpdateHook(OctreeElementUpdateHook* hook);
static void removeUpdateHook(OctreeElementUpdateHook* hook);
static void resetPopulationStatistics();
static unsigned long getNodeCount() { return _voxelNodeCount; }
static unsigned long getInternalNodeCount() { return _voxelNodeCount - _voxelNodeLeafCount; }
static unsigned long getLeafNodeCount() { return _voxelNodeLeafCount; }