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

Method removeShape

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

Source from the content-addressed store, hash-verified

197}
198
199void Space::removeShape( Shape* shape ) {
200 if ( NULL != shape ) {
201 cpSpaceRemoveShape( mSpace, shape->getShape() );
202
203 auto foundIt = std::find( mShapes.begin(), mShapes.end(), shape );
204 if ( foundIt != mShapes.end() )
205 mShapes.erase( foundIt );
206
207 PhysicsManager::instance()->addShapeFree( shape );
208 }
209}
210
211void Space::removeStaticShape( Shape* shape ) {
212 if ( NULL != shape ) {

Callers 2

postStepRemoveMethod · 0.80
postStepRemoveFunction · 0.80

Calls 6

findFunction · 0.85
getShapeMethod · 0.80
addShapeFreeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

postStepRemoveMethod · 0.64