Update the physics world (take a simulation step)
| 57 | |
| 58 | // Update the physics world (take a simulation step) |
| 59 | void JointsScene::updatePhysics() { |
| 60 | |
| 61 | // Update the motor speed of the Slider Joint (to move up and down) |
| 62 | double motorSpeed = 2.0 * std::cos(mEngineSettings.elapsedTime.count() * 1.5); |
| 63 | mSliderJoint->setMotorSpeed(rp3d::decimal(motorSpeed)); |
| 64 | |
| 65 | SceneDemo::updatePhysics(); |
| 66 | } |
| 67 | |
| 68 | // Create the physics world |
| 69 | void JointsScene::createPhysicsWorld() { |
nothing calls this directly
no test coverage detected