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

Method reset

src/collision/broadphase/DynamicAABBTree.cpp:78–90  ·  view source on GitHub ↗

Clear all the nodes and reset the tree

Source from the content-addressed store, hash-verified

76
77// Clear all the nodes and reset the tree
78void DynamicAABBTree::reset() {
79
80 // Call the destructor of all the nodes
81 for (int32 i=0; i < mNbAllocatedNodes; i++) {
82 mNodes[i].~TreeNode();
83 }
84
85 // Free the allocated memory for the nodes
86 mAllocator.release(mNodes, static_cast<size_t>(mNbAllocatedNodes) * sizeof(TreeNode));
87
88 // Initialize the tree
89 init();
90}
91
92// Allocate and return a new node in the tree
93int32 DynamicAABBTree::allocateNode() {

Callers

nothing calls this directly

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected