| 178 | } |
| 179 | |
| 180 | void Physics::initSimulation() { |
| 181 | /*------- BULLET --------*/ |
| 182 | broadphase = new btDbvtBroadphase(); |
| 183 | // Set up the collision configuration and dispatcher |
| 184 | collisionConfiguration = new btDefaultCollisionConfiguration(); |
| 185 | dispatcher = new btCollisionDispatcher(collisionConfiguration); |
| 186 | // The actual physics solver |
| 187 | solver = new btSequentialImpulseConstraintSolver; |
| 188 | // The world. |
| 189 | dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration); |
| 190 | dynamicsWorld->setGravity(btVector3(0, -9.81f, 0)); |
| 191 | dynamicsWorld->setDebugDrawer(&mydebugdrawer); |
| 192 | } |
| 193 | |
| 194 | void Physics::stepSimulation(float time) { |
| 195 | dynamicsWorld->stepSimulation(time, 100); |
nothing calls this directly
no outgoing calls
no test coverage detected