struct
simulation_constantsConstants used to tweak various aspects of the physics simulation.
Public static functions
-
static auto defaults() -> simulation_
constants noexcept - Returns a simulation_
constants instance with all values initialized to their internal defaults.
Public variables
- float units_per_meter
- How big is a meter in your engine/application's unit system?
- float damping
- The global velocity damping applied to all particles in the simulation.
- vec3 gravity
- The global gravity applied to all objects in the simulation.
Function documentation
static simulation_ constants stim:: simulation_constants:: defaults() noexcept
Returns a simulation_
Variable documentation
float stim:: simulation_constants:: units_per_meter
How big is a meter in your engine/application's unit system?
This is used internally to scale densities, forces, et cetera, and should be carefully chosen to match the scale of your scene/engine/asset convention. For example: in Unreal Engine 4 the base unit of distance is centimeters, so this value would be set to 100
when used in that setting.
float stim:: simulation_constants:: damping
The global velocity damping applied to all particles in the simulation.