MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / ~PhysicsSystem

Method ~PhysicsSystem

src/physics/PhysicsSystem.cpp:38–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38PhysicsSystem::~PhysicsSystem()
39{
40 for (size_t i = 0; i < m_PhysicsObjectAllocator.getNumObtainedElements(); i++)
41 {
42 m_pDynamicsWorld->removeRigidBody(m_PhysicsObjectAllocator.getElements()[i].rigidBody);
43 PhysicsObject::clean(m_PhysicsObjectAllocator.getElements()[i]);
44 }
45
46 for (size_t i = 0; i < m_CollisionShapeAllocator.getNumObtainedElements(); i++)
47 {
48 CollisionShape::clean(m_CollisionShapeAllocator.getElements()[i]);
49 }
50
51 delete m_pDynamicsWorld->getDebugDrawer();
52
53 delete m_pDynamicsWorld;
54 delete m_pSolver;
55 delete m_pDispatcher;
56 delete m_pCollisionConfiguration;
57 delete m_pBroadphase;
58 delete m_pPairCache;
59}
60
61void PhysicsSystem::debugDraw()
62{

Callers

nothing calls this directly

Calls 3

removeRigidBodyMethod · 0.80
getElementsMethod · 0.45

Tested by

no test coverage detected