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

Method removeCollider

src/systems/BroadPhaseSystem.cpp:100–114  ·  view source on GitHub ↗

Remove a collider from the broad-phase collision detection

Source from the content-addressed store, hash-verified

98
99// Remove a collider from the broad-phase collision detection
100void BroadPhaseSystem::removeCollider(Collider* collider) {
101
102 assert(collider->getBroadPhaseId() != -1);
103
104 int broadPhaseID = collider->getBroadPhaseId();
105
106 mCollidersComponents.setBroadPhaseId(collider->getEntity(), -1);
107
108 // Remove the collision shape from the dynamic AABB tree
109 mDynamicAABBTree.removeObject(broadPhaseID);
110
111 // Remove the collision shape into the array of shapes that have moved (or have been created)
112 // during the last simulation step
113 removeMovedCollider(broadPhaseID);
114}
115
116// Update the broad-phase state of a single collider
117void BroadPhaseSystem::updateCollider(Entity colliderEntity) {

Callers

nothing calls this directly

Calls 4

setBroadPhaseIdMethod · 0.80
removeObjectMethod · 0.80
getBroadPhaseIdMethod · 0.45
getEntityMethod · 0.45

Tested by

no test coverage detected