mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 16:33:56 +02:00
adds reset of octree element population statistics
This commit is contained in:
parent
56492e3ac8
commit
c6c4b58699
2 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue