Weld joint definition.
More...
#include <WeldJointConf.hpp>
|
(Note that these are not member functions.)
|
|
constexpr Momentum2 | GetLinearReaction (const WeldJointConf &object) noexcept |
| | Gets the current linear reaction of the given configuration.
|
| |
|
constexpr AngularMomentum | GetAngularReaction (const WeldJointConf &object) noexcept |
| | Gets the current angular reaction of the given configuration.
|
| |
|
constexpr auto | ShiftOrigin (WeldJointConf &, Length2) noexcept |
| | Shifts the origin notion of the given configuration.
|
| |
| void | InitVelocity (WeldJointConf &object, std::vector< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
| | Initializes velocity constraint data based on the given solver data. More...
|
| |
| bool | SolveVelocity (WeldJointConf &object, std::vector< BodyConstraint > &bodies, const StepConf &step) |
| | Solves velocity constraint. More...
|
| |
| bool | SolvePosition (const WeldJointConf &object, std::vector< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
| | Solves the position constraint. More...
|
| |
|
constexpr void | SetFrequency (WeldJointConf &object, NonNegative< Frequency > value) noexcept |
| | Free function for setting the frequency of the given configuration.
|
| |
|
constexpr void | SetDampingRatio (WeldJointConf &object, Real value) noexcept |
| | Free function for setting the damping ratio of the given configuration.
|
| |
|
void | Set (JointConf &def, const Joint &joint) noexcept |
| | Sets the joint definition data for the given joint.
|
| |
Weld joint definition.
- Note
- A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
-
You need to specify local anchor points where they are attached and the relative body angle.
-
The position of the anchor points is important for computing the reaction torque.
- See also
- Joint, World::CreateJoint
- Examples
- WeldJoint.cpp.
◆ WeldJointConf()
Initializing constructor.
Initializes the bodies, anchors, and reference angle using a world anchor point.
- Parameters
-
| bodyA | Identifier of body A. |
| laA | Local anchor A location in world coordinates. |
| bodyB | Identifier of body B. |
| laB | Local anchor B location in world coordinates. |
| ra | Reference angle. |
◆ InitVelocity()
Initializes velocity constraint data based on the given solver data.
- Note
- This MUST be called prior to calling
SolveVelocity.
- See also
- SolveVelocity.
◆ SolvePosition()
Solves the position constraint.
- Returns
true if the position errors are within tolerance.
◆ SolveVelocity()
Solves velocity constraint.
- Precondition
InitVelocity has been called.
- See also
- InitVelocity.
- Returns
true if velocity is "solved", false otherwise.
◆ dampingRatio
| Real playrho::d2::WeldJointConf::dampingRatio = 0 |
◆ frequency
Mass-spring-damper frequency.
- Note
- Rotation only.
-
Disable softness with a value of 0.
- Examples
- WeldJoint.cpp.
Referenced by UseFrequency().
The documentation for this struct was generated from the following files:
- WeldJointConf.hpp
- WeldJointConf.cpp