|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Configuration options for a Simulation. More...
#include <GREM/physics/Simulation.hpp>
Public Attributes | |
| Time | stepInterval = Scalar{1} / (Scalar{60} * HERTZ) |
| Time delta to advance the state of the world by on each simulation step. | |
| execution::Task::ParallelCount | targetParallelism = static_cast<execution::Task::ParallelCount>(clamp(Thread::hardware_concurrency(), 2u, 16u) - 1) |
| Assumed level of parallelism available when a simulation step is scheduled, and also later when the schedule is executed. | |
| size_t | subStepCount = 8 |
| How many sub-steps of the constraint solver to run in the simulation step. | |
| size_t | contactColorCount = (targetParallelism >= 2) ? MAX_CONTACT_COLOR_COUNT : 0 |
| Number of contact colors to use for graph coloring in order to parallelize the solvers. | |
| CollisionAlgorithmOptions< N > | collisionAlgorithmOptions {} |
| Collision algorithm options. | |
| Angle | maxContactManifoldAngleTolerance = Scalar{20} * DEGREES |
| Maximum angle between the normals of the old and new versions of a contact manifold before they're considered to be different manifolds and the old accumulated contact momentums are discarded. | |
| Distance | minObjectSizeApproximation = Scalar{0.01} * METERS |
| Approximation of the minimum width of the shapes of the objects that will be simulated (excluding point shapes). | |
| Speed | maxRestingSpeed = Scalar{0.1} * METERS_PER_SECOND |
| Linear speed at or below which objects are considered to be at rest. | |
| AngularSpeed | maxRestingAngularSpeed = Scalar{4} * DEGREES_PER_SECOND |
| Angular speed at or below which objects are considered to be at rest. | |
| Time | restingTimeThreshold = Scalar{1} * SECONDS |
| How long an object with resting enabled can spend below resting speed before it gets flagged as inactive. | |
| Coefficient | potentialCollisionVelocitySafetyCoefficient = Scalar{2} |
| Safety coefficient to multiply the velocities of objects by when building their bounding volumes, which are used to detect potential collisions, for the full step. | |
| Coefficient | contactWarmstartCoefficient = Scalar{0.99} |
| How much of the contact constraint momentums from the last simulation step to preserve to the current step for the purpose of improving convergence in the constraint solver. | |
| Coefficient | jointWarmstartCoefficient = Scalar{0.99} |
| How much of the joint constraint momentums from the last simulation step to preserve to the current step for the purpose of improving convergence in the constraint solver. | |
| Frequency | contactStiffness = Scalar{60} * HERTZ |
| Stiffness of contact constraints. | |
| Coefficient | contactDampingRatio = Scalar{2} |
| Damping ratio used when solving contact constraints. | |
| Momentum | jointMaxMomentum = Scalar{50000} * KILOGRAM_METERS_PER_SECOND |
| Maximum linear momentum limit of joint constraints. | |
| AngularMomentum2D | jointMaxAngularMomentum = Scalar{50000} * KILOGRAM_SQUARE_METERS_PER_SECOND |
| Maximum angular momentum limit of joint constraints. | |
| Momentum | contactMaxMomentum = Scalar{50000} * KILOGRAM_METERS_PER_SECOND |
| Maximum momentum limit of contact constraints. | |
Static Public Attributes | |
| static constexpr size_t | MAX_CONTACT_COLOR_COUNT = N * 4 |
| Maximum supported number of contact colors. | |
Configuration options for a Simulation.
| N | number of dimensions of the world space (must be 2 or 3). |
|
staticconstexpr |
Maximum supported number of contact colors.
| Time grem::physics::SimulationOptions< N >::stepInterval = Scalar{1} / (Scalar{60} * HERTZ) |
Time delta to advance the state of the world by on each simulation step.
| execution::Task::ParallelCount grem::physics::SimulationOptions< N >::targetParallelism = static_cast<execution::Task::ParallelCount>(clamp(Thread::hardware_concurrency(), 2u, 16u) - 1) |
Assumed level of parallelism available when a simulation step is scheduled, and also later when the schedule is executed.
| size_t grem::physics::SimulationOptions< N >::subStepCount = 8 |
How many sub-steps of the constraint solver to run in the simulation step.
| size_t grem::physics::SimulationOptions< N >::contactColorCount = (targetParallelism >= 2) ? MAX_CONTACT_COLOR_COUNT : 0 |
Number of contact colors to use for graph coloring in order to parallelize the solvers.
| CollisionAlgorithmOptions<N> grem::physics::SimulationOptions< N >::collisionAlgorithmOptions {} |
Collision algorithm options.
| Angle grem::physics::SimulationOptions< N >::maxContactManifoldAngleTolerance = Scalar{20} * DEGREES |
Maximum angle between the normals of the old and new versions of a contact manifold before they're considered to be different manifolds and the old accumulated contact momentums are discarded.
| Distance grem::physics::SimulationOptions< N >::minObjectSizeApproximation = Scalar{0.01} * METERS |
Approximation of the minimum width of the shapes of the objects that will be simulated (excluding point shapes).
Objects smaller than this are allowed, but may cause worse performance.
| Speed grem::physics::SimulationOptions< N >::maxRestingSpeed = Scalar{0.1} * METERS_PER_SECOND |
Linear speed at or below which objects are considered to be at rest.
When an object has resting enabled, going below this speed and maxRestingAngularSpeed at the same time causes its ObjectActivity::stepsResting counter to increase until it is eventually frozen in place after the restingTimeThreshold.
| AngularSpeed grem::physics::SimulationOptions< N >::maxRestingAngularSpeed = Scalar{4} * DEGREES_PER_SECOND |
Angular speed at or below which objects are considered to be at rest.
When an object has resting enabled, going below this speed and maxRestingSpeed at the same time causes its ObjectActivity::stepsResting counter to increase until it is eventually frozen in place after the restingTimeThreshold.
| Time grem::physics::SimulationOptions< N >::restingTimeThreshold = Scalar{1} * SECONDS |
How long an object with resting enabled can spend below resting speed before it gets flagged as inactive.
| Coefficient grem::physics::SimulationOptions< N >::potentialCollisionVelocitySafetyCoefficient = Scalar{2} |
Safety coefficient to multiply the velocities of objects by when building their bounding volumes, which are used to detect potential collisions, for the full step.
This aims to account for potential acceleration changes during the step.
| Coefficient grem::physics::SimulationOptions< N >::contactWarmstartCoefficient = Scalar{0.99} |
How much of the contact constraint momentums from the last simulation step to preserve to the current step for the purpose of improving convergence in the constraint solver.
| Coefficient grem::physics::SimulationOptions< N >::jointWarmstartCoefficient = Scalar{0.99} |
How much of the joint constraint momentums from the last simulation step to preserve to the current step for the purpose of improving convergence in the constraint solver.
| Frequency grem::physics::SimulationOptions< N >::contactStiffness = Scalar{60} * HERTZ |
Stiffness of contact constraints.
Controls how fast overlap is corrected on the velocity level, at the cost of potential jitter.
| Coefficient grem::physics::SimulationOptions< N >::contactDampingRatio = Scalar{2} |
Damping ratio used when solving contact constraints.
| Momentum grem::physics::SimulationOptions< N >::jointMaxMomentum = Scalar{50000} * KILOGRAM_METERS_PER_SECOND |
Maximum linear momentum limit of joint constraints.
| AngularMomentum2D grem::physics::SimulationOptions< N >::jointMaxAngularMomentum = Scalar{50000} * KILOGRAM_SQUARE_METERS_PER_SECOND |
Maximum angular momentum limit of joint constraints.
| Momentum grem::physics::SimulationOptions< N >::contactMaxMomentum = Scalar{50000} * KILOGRAM_METERS_PER_SECOND |
Maximum momentum limit of contact constraints.