Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Time of impact configuration. More...
#include <TimeOfImpact.hpp>
Public Types | |
using | root_iter_type = std::remove_const< decltype(DefaultMaxToiRootIters)>::type |
using | toi_iter_type = std::remove_const< decltype(DefaultMaxToiIters)>::type |
using | dist_iter_type = std::remove_const< decltype(DefaultMaxDistanceIters)>::type |
Public Member Functions | |
constexpr ToiConf & | UseTimeMax (RealNum value) noexcept |
constexpr ToiConf & | UseTargetDepth (Length value) noexcept |
constexpr ToiConf & | UseTolerance (Length value) noexcept |
constexpr ToiConf & | UseMaxRootIters (root_iter_type value) noexcept |
constexpr ToiConf & | UseMaxToiIters (toi_iter_type value) noexcept |
constexpr ToiConf & | UseMaxDistIters (dist_iter_type value) noexcept |
Public Attributes | |
RealNum | tMax = 1 |
Length | targetDepth = DefaultLinearSlop * RealNum{3} |
Targetted depth of impact. More... | |
Length | tolerance = DefaultLinearSlop / RealNum{4} |
Tolerance. More... | |
root_iter_type | maxRootIters = DefaultMaxToiRootIters |
Maximum number of root finder iterations. More... | |
toi_iter_type | maxToiIters = DefaultMaxToiIters |
Max time of impact iterations. More... | |
dist_iter_type | maxDistIters = DefaultMaxDistanceIters |
Time of impact configuration.
These parameters effect time of impact calculations by limiting the definitions of time and impact. If total radius is expressed as TR, and target depth as TD, then: the max target distance is (TR - TD) + tolerance; and the min target distance is (TR - TD) - tolerance.
using box2d::ToiConf::dist_iter_type = std::remove_const<decltype(DefaultMaxDistanceIters)>::type |
using box2d::ToiConf::root_iter_type = std::remove_const<decltype(DefaultMaxToiRootIters)>::type |
using box2d::ToiConf::toi_iter_type = std::remove_const<decltype(DefaultMaxToiIters)>::type |
|
noexcept |
|
noexcept |
|
noexcept |
dist_iter_type box2d::ToiConf::maxDistIters = DefaultMaxDistanceIters |
root_iter_type box2d::ToiConf::maxRootIters = DefaultMaxToiRootIters |
Maximum number of root finder iterations.
This is the maximum number of iterations for calculating the 1D root of f(t) - (totalRadius - targetDepth) < tolerance
where f(t)
is the distance between the shapes at time t
, and totalRadius
is the sum of the vertex radiuses of 2 distance proxies.
toi_iter_type box2d::ToiConf::maxToiIters = DefaultMaxToiIters |
Max time of impact iterations.
Length box2d::ToiConf::targetDepth = DefaultLinearSlop * RealNum{3} |
Targetted depth of impact.
RealNum box2d::ToiConf::tMax = 1 |
Length box2d::ToiConf::tolerance = DefaultLinearSlop / RealNum{4} |
Tolerance.