MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / check

Method check

src/collision/broadphase/DynamicAABBTree.cpp:752–768  ·  view source on GitHub ↗

Check if the tree structure is valid (for debugging purpose)

Source from the content-addressed store, hash-verified

750
751// Check if the tree structure is valid (for debugging purpose)
752void DynamicAABBTree::check() const {
753
754 // Recursively check each node
755 checkNode(mRootNodeID);
756
757 int32 nbFreeNodes = 0;
758 int32 freeNodeID = mFreeNodeID;
759
760 // Check the free nodes
761 while(freeNodeID != TreeNode::NULL_TREE_NODE) {
762 assert(0 <= freeNodeID && freeNodeID < mNbAllocatedNodes);
763 freeNodeID = mNodes[freeNodeID].nextNodeID;
764 nbFreeNodes++;
765 }
766
767 assert(mNbNodes + nbFreeNodes == mNbAllocatedNodes);
768}
769
770// Check if the node structure is valid (for debugging purpose)
771void DynamicAABBTree::checkNode(int32 nodeID) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected