Friction joint definition.
More...
#include <playrho/d2/FrictionJointConf.hpp>
|
(Note that these are not member functions.)
|
|
constexpr AngularMomentum | GetAngularReaction (const FrictionJointConf &object) noexcept |
| | Gets the current angular reaction for the given configuration.
|
| |
|
constexpr Momentum2 | GetLinearReaction (const FrictionJointConf &object) noexcept |
| | Gets the current linear reaction for the given configuration.
|
| |
|
constexpr auto | GetMaxForce (const FrictionJointConf &object) noexcept |
| | Free function for getting the max force value of the given configuration.
|
| |
|
constexpr auto | GetMaxTorque (const FrictionJointConf &object) noexcept |
| | Free function for getting the max torque value of the given configuration.
|
| |
| void | InitVelocity (FrictionJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
| | Initializes velocity constraint data based on the given solver data. More...
|
| |
|
constexpr void | SetMaxForce (FrictionJointConf &object, NonNegative< Force > value) noexcept |
| | Free function for setting the max force value of the given configuration.
|
| |
|
constexpr auto | SetMaxTorque (FrictionJointConf &object, NonNegative< Torque > value) noexcept |
| | Free function for setting the max force value of the given configuration.
|
| |
|
constexpr bool | ShiftOrigin (FrictionJointConf &, Length2) noexcept |
| | Shifts the origin notion of the given configuration.
|
| |
| bool | SolvePosition (const FrictionJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
| | Solves the position constraint. More...
|
| |
| bool | SolveVelocity (FrictionJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step) |
| | Solves velocity constraint. More...
|
| |
|
void | Set (JointConf &def, const Joint &joint) noexcept |
| | Sets the joint definition data for the given joint.
|
| |
Friction joint definition.
This is used for top-down friction. It provides 2-D translational friction and angular friction.
- See also
- Joint, World::CreateJoint
◆ FrictionJointConf()
Initializing constructor.
Initialize the bodies and local anchors.
- Postcondition
bodyA will hold the value of bA.
-
bodyB will hold the value of bB.
-
localAnchorA will hold the value of laA.
-
localAnchorB will hold the value of laB.
-
All other member variables will be zero initialized.
◆ InitVelocity()
Initializes velocity constraint data based on the given solver data.
- Note
- This MUST be called prior to calling
SolveVelocity.
- Parameters
-
| object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID. |
| bodies | Container of body constraints. |
| step | Configuration for the step. |
| conf | Constraint solver configuration. |
- Exceptions
-
| std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
- See also
- SolveVelocity.
◆ SolvePosition()
Solves the position constraint.
- Note
- This is a no-op and always returns
true.
- Returns
true.
◆ SolveVelocity()
Solves velocity constraint.
- Precondition
InitVelocity has been called.
- Parameters
-
| object | Configuration object. bodyA and bodyB must index bodies within the given bodies container or be the special body ID value of InvalidBodyID. |
| bodies | Container of body constraints. |
| step | Configuration for the step. |
- Exceptions
-
| std::out_of_range | If the given object's bodyA or bodyB values are not InvalidBodyID and are not indices within range of the given bodies container. |
- See also
- InitVelocity.
- Returns
true if velocity is "solved", false otherwise.
The documentation for this struct was generated from the following files: