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

Method removeAllColliders

src/body/Body.cpp:200–209  ·  view source on GitHub ↗

Remove all the colliders

Source from the content-addressed store, hash-verified

198
199// Remove all the colliders
200void Body::removeAllColliders() {
201
202 // Look for the collider that contains the collision shape in parameter.
203 // Note that we need to copy the array of collider entities because we are deleting them in a loop.
204 const Array<Entity> collidersEntities = mWorld.mBodyComponents.getColliders(mEntity);
205 for (uint32 i=0; i < collidersEntities.size(); i++) {
206
207 removeCollider(mWorld.mCollidersComponents.getCollider(collidersEntities[i]));
208 }
209}
210
211// Return the current position and orientation
212/**

Callers 1

destroyRigidBodyMethod · 0.80

Calls 2

sizeMethod · 0.45
getColliderMethod · 0.45

Tested by

no test coverage detected