MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / initSimulation

Method initSimulation

src/Physics/Physics.cpp:180–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void 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
194void Physics::stepSimulation(float time) {
195 dynamicsWorld->stepSimulation(time, 100);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected