Destroy the physics world
| 164 | |
| 165 | // Destroy the physics world |
| 166 | void JointsScene::destroyPhysicsWorld() { |
| 167 | |
| 168 | if (mPhysicsWorld != nullptr) { |
| 169 | |
| 170 | delete mSliderJointBottomBox; |
| 171 | delete mSliderJointTopBox; |
| 172 | delete mPropellerBox; |
| 173 | delete mFixedJointBox1; |
| 174 | delete mFixedJointBox2; |
| 175 | for (int i=0; i<NB_BALLSOCKETJOINT_BOXES; i++) { |
| 176 | delete mBallAndSocketJointChainBoxes[i]; |
| 177 | } |
| 178 | |
| 179 | // Destroy the floor |
| 180 | delete mFloor; |
| 181 | |
| 182 | mPhysicsObjects.clear(); |
| 183 | |
| 184 | mPhysicsCommon.destroyPhysicsWorld(mPhysicsWorld); |
| 185 | mPhysicsWorld = nullptr; |
| 186 | } |
| 187 | } |
| 188 | // Reset the scene |
| 189 | void JointsScene::reset() { |
| 190 |