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

Method updateBroadPhaseState

src/body/Body.cpp:222–237  ·  view source on GitHub ↗

Update the broad-phase state for this body (because it has moved for instance)

Source from the content-addressed store, hash-verified

220
221// Update the broad-phase state for this body (because it has moved for instance)
222void Body::updateBroadPhaseState() const {
223
224 // For all the colliders of the body
225 const Array<Entity>& colliderEntities = mWorld.mBodyComponents.getColliders(mEntity);
226 const uint32 nbColliderEntities = static_cast<uint32>(colliderEntities.size());
227 for (uint32 i=0; i < nbColliderEntities; i++) {
228
229 // Update the local-to-world transform of the collider
230 mWorld.mCollidersComponents.setLocalToWorldTransform(colliderEntities[i],
231 mWorld.mTransformComponents.getTransform(mEntity) *
232 mWorld.mCollidersComponents.getLocalToBodyTransform(colliderEntities[i]));
233
234 // Update the collider
235 mWorld.mCollisionDetection.updateCollider(colliderEntities[i]);
236 }
237}
238
239// Set whether or not the body is active
240/**

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
updateColliderMethod · 0.45

Tested by

no test coverage detected