Return default engine settings
| 71 | |
| 72 | /// Return default engine settings |
| 73 | static EngineSettings defaultSettings() { |
| 74 | |
| 75 | EngineSettings defaultSettings; |
| 76 | |
| 77 | rp3d::PhysicsWorld::WorldSettings worldSettings; |
| 78 | defaultSettings.timeStep = std::chrono::duration<double>(1.0f / 60.0f); |
| 79 | defaultSettings.nbVelocitySolverIterations = worldSettings.defaultVelocitySolverNbIterations; |
| 80 | defaultSettings.nbPositionSolverIterations = worldSettings.defaultPositionSolverNbIterations; |
| 81 | defaultSettings.isSleepingEnabled = worldSettings.isSleepingEnabled; |
| 82 | defaultSettings.timeBeforeSleep = worldSettings.defaultTimeBeforeSleep; |
| 83 | defaultSettings.sleepLinearVelocity = worldSettings.defaultSleepLinearVelocity; |
| 84 | defaultSettings.sleepAngularVelocity = worldSettings.defaultSleepAngularVelocity; |
| 85 | defaultSettings.isGravityEnabled = true; |
| 86 | defaultSettings.gravity = openglframework::Vector3(0, -9.81, 0); |
| 87 | |
| 88 | return defaultSettings; |
| 89 | } |
| 90 | }; |
| 91 | |
| 92 | // Class Scene |