Handles physics simulation including gravity and N-body dynamics.
More...
#include <physics_system.hpp>
|
| void | update (float deltaTime) |
| | Update physics simulation for one frame.
|
Handles physics simulation including gravity and N-body dynamics.
- Warning
- High timeScale values may cause simulation instability
◆ update()
| void solarsim::PhysicsSystem::update |
( |
float | deltaTime | ) |
|
Update physics simulation for one frame.
- Parameters
-
| deltaTime | Time step for physics integration in seconds |
- Note
- Applies gravitational forces and updates rigid body positions @doublenote ;)) Small deltaTime values provide more stable simulation
| const float solarsim::PhysicsSystem::G = 10.0f |
|
private |
◆ SOFTENING_SQUARED
| const float solarsim::PhysicsSystem::SOFTENING_SQUARED = 1.0f |
|
private |
Softening factor to prevent numerical instability
◆ timeScale
| float solarsim::PhysicsSystem::timeScale = 1.0f |
|
private |
Physics simulation speed multiplier
The documentation for this class was generated from the following files: