Constraint solver configuration data. More...
#include <playrho/ConstraintSolverConf.hpp>
Public Member Functions | |
| constexpr ConstraintSolverConf & | UseAngularSlop (Angle value) noexcept |
| Uses the given angular slop. | |
| constexpr ConstraintSolverConf & | UseLinearSlop (Length value) noexcept |
| Uses the given linear slop. | |
| constexpr ConstraintSolverConf & | UseMaxAngularCorrection (Angle value) noexcept |
| Uses the given max angular correction. | |
| constexpr ConstraintSolverConf & | UseMaxLinearCorrection (Length value) noexcept |
| Uses the given max linear correction. | |
| constexpr ConstraintSolverConf & | UseResolutionRate (Real value) noexcept |
| Uses the given resolution rate. | |
Static Public Attributes | |
| static constexpr auto | DefaultAngularSlop = ::playrho::DefaultAngularSlop |
| Default angular slop. | |
| static constexpr auto | DefaultLinearSlop = ::playrho::DefaultLinearSlop |
| Default linear slop. | |
| static constexpr auto | DefaultMaxAngularCorrection = DefaultAngularSlop * Real{4} |
| Default max angular correction. | |
| static constexpr auto | DefaultMaxLinearCorrection = DefaultLinearSlop * Real{20} |
| Default max linear correction. | |
| static constexpr auto | DefaultRegResolutionRate = Real(0.2) |
| Default regular resolution rate. | |
| static constexpr auto | DefaultToiResolutionRate = Real(0.75) |
| Default time of impact (TOI) resolution rate. | |
Constraint solver configuration data.
Defines how a constraint solver should resolve a given constraint.
| Angle playrho::ConstraintSolverConf::angularSlop = DefaultAngularSlop |
Angular slop.
DefaultAngularSlop. Referenced by playrho::d2::RevoluteJointConf::InitVelocity(), playrho::d2::GearJointConf::SolvePosition(), playrho::d2::PrismaticJointConf::SolvePosition(), playrho::d2::RevoluteJointConf::SolvePosition(), playrho::d2::WeldJointConf::SolvePosition(), and UseAngularSlop().
| Length playrho::ConstraintSolverConf::linearSlop = DefaultLinearSlop |
Linear slop.
DefaultLinearSlop. Referenced by playrho::d2::PrismaticJointConf::InitVelocity(), playrho::d2::RopeJointConf::InitVelocity(), playrho::d2::DistanceJointConf::SolvePosition(), playrho::d2::GearJointConf::SolvePosition(), playrho::d2::PrismaticJointConf::SolvePosition(), playrho::d2::PulleyJointConf::SolvePosition(), playrho::d2::RevoluteJointConf::SolvePosition(), playrho::d2::RopeJointConf::SolvePosition(), playrho::d2::WeldJointConf::SolvePosition(), playrho::d2::WheelJointConf::SolvePosition(), playrho::GaussSeidel::SolvePositionConstraint(), and UseLinearSlop().
| Angle playrho::ConstraintSolverConf::maxAngularCorrection = DefaultMaxAngularCorrection |
Maximum angular correction.
Maximum angular position correction used when solving constraints. Helps to prevent overshoot.
angularSlop * 4. Referenced by playrho::d2::Position::Cap(), playrho::d2::RevoluteJointConf::SolvePosition(), and UseMaxAngularCorrection().
| Length playrho::ConstraintSolverConf::maxLinearCorrection = DefaultMaxLinearCorrection |
Maximum linear correction.
Maximum amount of overlap to resolve in a single solver call. Helps prevent overshoot.
linearSlop * 40. Referenced by playrho::d2::Position::Cap(), playrho::d2::DistanceJointConf::SolvePosition(), playrho::d2::PrismaticJointConf::SolvePosition(), playrho::d2::RopeJointConf::SolvePosition(), playrho::GaussSeidel::SolvePositionConstraint(), and UseMaxLinearCorrection().
| Real playrho::ConstraintSolverConf::resolutionRate = DefaultRegResolutionRate |
Resolution rate.
Defines the percentage of the overlap that should get resolved in a single solver call. Value greater than zero and less than or equal to one. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often leads to overshoot.
0.2 for solving regular constraints or 0.75 for solving TOI constraints. Referenced by playrho::d2::GearJointConf::SolvePosition(), playrho::GaussSeidel::SolvePositionConstraint(), and UseResolutionRate().