| 36 | } |
| 37 | |
| 38 | PhysicsSystem::~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 | |
| 61 | void PhysicsSystem::debugDraw() |
| 62 | { |
nothing calls this directly
no test coverage detected