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

Method updateColliderInternal

src/systems/BroadPhaseSystem.cpp:140–156  ·  view source on GitHub ↗

Notify the broad-phase that a collision shape has moved and need to be updated

Source from the content-addressed store, hash-verified

138
139// Notify the broad-phase that a collision shape has moved and need to be updated
140void BroadPhaseSystem::updateColliderInternal(int32 broadPhaseId, Collider* collider, const AABB& aabb,
141 bool forceReInsert) {
142
143 assert(broadPhaseId >= 0);
144
145 // Update the dynamic AABB tree according to the movement of the collision shape
146 bool hasBeenReInserted = mDynamicAABBTree.updateObject(broadPhaseId, aabb, forceReInsert);
147
148 // If the collision shape has moved out of its fat AABB (and therefore has been reinserted
149 // into the tree).
150 if (hasBeenReInserted) {
151
152 // Add the collision shape into the array of shapes that have moved (or have been created)
153 // during the last simulation step
154 addMovedCollider(broadPhaseId, collider);
155 }
156}
157
158// Update the broad-phase state of some colliders components
159void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems) {

Callers

nothing calls this directly

Calls 1

updateObjectMethod · 0.80

Tested by

no test coverage detected