Create the physics world
| 67 | |
| 68 | // Create the physics world |
| 69 | void JointsScene::createPhysicsWorld() { |
| 70 | |
| 71 | // Gravity vector in the physics world |
| 72 | mWorldSettings.gravity = rp3d::Vector3(mEngineSettings.gravity.x, mEngineSettings.gravity.y, mEngineSettings.gravity.z); |
| 73 | |
| 74 | // Create the physics world for the physics simulation |
| 75 | mPhysicsWorld = mPhysicsCommon.createPhysicsWorld(mWorldSettings); |
| 76 | mPhysicsWorld->setEventListener(this); |
| 77 | |
| 78 | // Create the Ball-and-Socket joint |
| 79 | createBallAndSocketJoints(); |
| 80 | |
| 81 | // Create the Slider joint |
| 82 | createSliderJoint(); |
| 83 | |
| 84 | // Create the Hinge joint |
| 85 | createPropellerHingeJoint(); |
| 86 | |
| 87 | // Create the Fixed joint |
| 88 | createFixedJoints(); |
| 89 | |
| 90 | // Create the floor |
| 91 | createFloor(); |
| 92 | } |
| 93 | |
| 94 | // Initialize the bodies positions |
| 95 | void JointsScene::initBodiesPositions() { |
nothing calls this directly
no test coverage detected