MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / createPhysicsWorld

Method createPhysicsWorld

testbed/scenes/joints/JointsScene.cpp:69–92  ·  view source on GitHub ↗

Create the physics world

Source from the content-addressed store, hash-verified

67
68// Create the physics world
69void 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
95void JointsScene::initBodiesPositions() {

Callers

nothing calls this directly

Calls 2

setEventListenerMethod · 0.80
Vector3Class · 0.50

Tested by

no test coverage detected