MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / destroyPhysicsWorld

Method destroyPhysicsWorld

testbed/scenes/joints/JointsScene.cpp:166–187  ·  view source on GitHub ↗

Destroy the physics world

Source from the content-addressed store, hash-verified

164
165// Destroy the physics world
166void 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
189void JointsScene::reset() {
190

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected