| 209 | } |
| 210 | |
| 211 | void Space::removeStaticShape( Shape* shape ) { |
| 212 | if ( NULL != shape ) { |
| 213 | cpSpaceRemoveStaticShape( mSpace, shape->getShape() ); |
| 214 | |
| 215 | auto foundIt = std::find( mShapes.begin(), mShapes.end(), shape ); |
| 216 | if ( foundIt != mShapes.end() ) |
| 217 | mShapes.erase( foundIt ); |
| 218 | |
| 219 | PhysicsManager::instance()->addShapeFree( shape ); |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | void Space::removeBody( Body* body ) { |
| 224 | if ( NULL != body ) { |