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

Method destroyPhysicsWorld

testbed/scenes/bridge/BridgeScene.cpp:209–226  ·  view source on GitHub ↗

Destroy the physics world

Source from the content-addressed store, hash-verified

207
208// Destroy the physics world
209void BridgeScene::destroyPhysicsWorld() {
210
211 if (mPhysicsWorld != nullptr) {
212
213 // Destroy all the physics objects of the scene
214 for (std::vector<PhysicsObject*>::iterator it = mPhysicsObjects.begin(); it != mPhysicsObjects.end(); ++it) {
215
216 // Destroy the object
217 delete (*it);
218 }
219
220 mHingeJoints.clear();
221 mPhysicsObjects.clear();
222
223 mPhysicsCommon.destroyPhysicsWorld(mPhysicsWorld);
224 mPhysicsWorld = nullptr;
225 }
226}
227
228// Reset the scene
229void BridgeScene::reset() {

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected