MCPcopy Create free account
hub / github.com/SpartanJ/eepp / removeBody

Method removeBody

src/modules/physics/src/eepp/physics/space.cpp:223–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void Space::removeBody( Body* body ) {
224 if ( NULL != body ) {
225 cpSpaceRemoveBody( mSpace, body->getBody() );
226
227 auto foundIt = std::find( mBodys.begin(), mBodys.end(), body );
228 if ( foundIt != mBodys.end() )
229 mBodys.erase( foundIt );
230
231 PhysicsManager::instance()->removeBodyFree( body );
232 }
233}
234
235void Space::removeConstraint( Constraint* constraint ) {
236 if ( NULL != constraint ) {

Callers 2

postStepRemoveMethod · 0.80
postStepRemoveFunction · 0.80

Calls 6

findFunction · 0.85
removeBodyFreeMethod · 0.80
getBodyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

postStepRemoveMethod · 0.64