Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Step configuration. More...
#include <StepConf.hpp>
Public Types | |
using | iteration_type = ts_iters_t |
Step iterations type. More... | |
Public Member Functions | |
Time | GetTime () const noexcept |
Gets the delta time (time amount for this time step). More... | |
Frequency | GetInvTime () const noexcept |
Gets the inverse delta-t value. More... | |
constexpr StepConf & | SetTime (Time value) noexcept |
Sets the delte time and inverse time from the given value and its inverse respectively. More... | |
constexpr StepConf & | SetInvTime (Frequency value) noexcept |
Sets the inverse time and delta time from the given value and its inverse respectively. More... | |
Static Public Attributes | |
static constexpr auto | InvalidIteration = static_cast<iteration_type>(-1) |
Invalid iteration value. More... | |
Step configuration.
Provides the primary means for configuring the per-step world physics simulation. All the values have defaults. These defaults are intended to most likely be the values desired.
dt
) is correct for your use. Step iterations type.
A type for countining iterations per-step.
|
inlinenoexcept |
|
inlinenoexcept |
Gets the delta time (time amount for this time step).
Sets the inverse time and delta time from the given value and its inverse respectively.
value | Inverse time amount. |
Sets the delte time and inverse time from the given value and its inverse respectively.
value | Elapsed time amount. |
Length box2d::StepConf::aabbExtension = DefaultAabbExtension |
AABB extension.
This is the extension that will be applied to Axis Aligned Bounding Box objects used in "broadphase" collision detection. This fattens AABBs in the dynamic tree. This allows proxies to move by a small amount without triggering a tree adjustment.
AngularVelocity box2d::StepConf::angularSleepTolerance = DefaultAngularSleepTolerance |
Angular sleep tolerance.
Angle box2d::StepConf::angularSlop = DefaultAngularSlop |
Angular slop.
RealNum box2d::StepConf::displaceMultiplier = DefaultDistanceMultiplier |
bool box2d::StepConf::doToi = true |
Do TOI.
Whether or not to perform continuous collision detection.
bool box2d::StepConf::doWarmStart = true |
Do warm start.
Whether or not to perform warm starting (in the regular phase).
RealNum box2d::StepConf::dtRatio = 1 |
Delta time ratio.
This is the delta-time multiplied by the inverse delta time from the previous world step. The value of 1 indicates that the time step has not varied.
|
static |
Invalid iteration value.
LinearVelocity box2d::StepConf::linearSleepTolerance = DefaultLinearSleepTolerance |
Linear sleep tolerance.
Length box2d::StepConf::linearSlop = DefaultLinearSlop |
Linear slop.
Linear slop for position resolution.
Angle box2d::StepConf::maxAngularCorrection = DefaultMaxAngularCorrection |
Maximum angular correction.
iteration_type box2d::StepConf::maxDistanceIters = DefaultMaxDistanceIters |
Max distance iterations.
Length box2d::StepConf::maxLinearCorrection = DefaultMaxLinearCorrection |
Maximum linear correction.
Maximum rotation.
The maximum angular velocity of a body.
iteration_type box2d::StepConf::maxSubSteps = DefaultMaxSubSteps |
Maximum sub steps.
This is the maximum number of sub-steps per contact in continuous physics simulation. In other words, this is the maximum number of times in a world step that a contact will have continuous collision resolution done for it.
iteration_type box2d::StepConf::maxToiIters = DefaultMaxToiIters |
Max TOI iterations.
iteration_type box2d::StepConf::maxToiRootIters = DefaultMaxToiRootIters |
Max TOI root finder iterations.
RealNum box2d::StepConf::maxTranslation = 4 |
Maximum translation.
The maximum linear velocity of a body.
Time box2d::StepConf::minStillTimeToSleep = DefaultMinStillTimeToSleep |
Minimum still time to sleep.
The time that a body must be still before it will be put to sleep.
Length box2d::StepConf::regMinSeparation = -DefaultLinearSlop * RealNum{3} |
Regular minimum separation.
This is the minimum amount of separation there must be between regular-phase interacting bodies for intra-step position resolution to be considered successful and end before all of the regular position iterations have been done.
iteration_type box2d::StepConf::regPositionIterations = 3 |
Regular position iterations.
This is the maximum number of iterations of position resolution that will be done before leaving any remaining unsatisfied positions for the next step. In this context, positions are satisfied when the minimum separation is greater than or equal to the regular minimum separation amount.
Regular resolution rate.
This scale factor controls how fast positional overlap is resolved. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often lead to overshoot.
iteration_type box2d::StepConf::regVelocityIterations = 8 |
Regular velocity iterations.
The number of iterations of velocity resolution that will be done in the step.
Length box2d::StepConf::targetDepth = DefaultLinearSlop * RealNum{3} |
Target depth.
Target depth of overlap for calculating the TOI for CCD elligible bodies.
Length box2d::StepConf::toiMinSeparation = -DefaultLinearSlop * RealNum(1.5f) |
Time of impact minimum separation.
This is the minimum amount of separation there must be between TOI-phase interacting bodies for intra-step position resolution to be considered successful and end before all of the TOI position iterations have been done.
iteration_type box2d::StepConf::toiPositionIterations = 20 |
TOI position iterations.
This value is the maximum number of iterations of position resolution that will be done before leaving any remaining unsatisfied positions for the next step. In this context, positions are satisfied when the minimum separation is greater than or equal to the TOI minimum separation amount.
Time of impact resolution rate.
This scale factor controls how fast positional overlap is resolved. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often lead to overshoot.
iteration_type box2d::StepConf::toiVelocityIterations = 8 |
TOI velocity iterations.
This is the number of iterations of velocity resolution that will be done in the step.
Length box2d::StepConf::tolerance = DefaultLinearSlop / RealNum{4} |
Tolerance.
The acceptable plus or minus tolerance from the target depth for TOI calculations.
LinearVelocity box2d::StepConf::velocityThreshold = DefaultVelocityThreshold |
Velocity threshold.
A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.