MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeBodyOrDelay

Method removeBodyOrDelay

core/physics/PhysicsWorld.cpp:658–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658void PhysicsWorld::removeBodyOrDelay(PhysicsBody* body)
659{
660 if (_delayAddBodies.getIndex(body) != AX_INVALID_INDEX)
661 {
662 _delayAddBodies.eraseObject(body);
663 return;
664 }
665
666 if (cpSpaceIsLocked(_cpSpace))
667 {
668 if (_delayRemoveBodies.getIndex(body) == AX_INVALID_INDEX)
669 {
670 _delayRemoveBodies.pushBack(body);
671 }
672 }
673 else
674 {
675 doRemoveBody(body);
676 }
677}
678
679void PhysicsWorld::removeJoint(PhysicsJoint* joint, bool destroy)
680{

Callers 1

setEnabledMethod · 0.80

Calls 4

cpSpaceIsLockedFunction · 0.85
eraseObjectMethod · 0.80
pushBackMethod · 0.80
getIndexMethod · 0.45

Tested by

no test coverage detected