|
| PulleyJointConf () noexcept |
| Default constructor.
|
|
| PulleyJointConf (BodyID bodyA, BodyID bodyB, Length2 groundAnchorA=DefaultGroundAnchorA, Length2 groundAnchorB=DefaultGroundAnchorB, Length2 anchorA=DefaultLocalAnchorA, Length2 anchorB=DefaultLocalAnchorB, Length lA=0_m, Length lB=0_m) |
| Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
|
|
constexpr auto & | UseRatio (Real v) noexcept |
| Uses the given ratio value.
|
|
constexpr reference | UseBodyA (BodyID b) noexcept |
| Use value for body A setting.
|
|
constexpr reference | UseBodyB (BodyID b) noexcept |
| Use value for body B setting.
|
|
constexpr reference | UseCollideConnected (bool v) noexcept |
| Use value for collide connected setting.
|
|
|
(Note that these are not member functions.)
|
constexpr Momentum2 | GetLinearReaction (const PulleyJointConf &object) noexcept |
| Gets the current linear reaction of the given configuration.
|
|
constexpr AngularMomentum | GetAngularReaction (const PulleyJointConf &) noexcept |
| Gets the current angular reaction of the given configuration.
|
|
bool | ShiftOrigin (PulleyJointConf &object, Length2 newOrigin) noexcept |
| Shifts the origin notion of the given configuration.
|
|
void | InitVelocity (PulleyJointConf &object, std::vector< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf) |
| Initializes velocity constraint data based on the given solver data. More...
|
|
bool | SolveVelocity (PulleyJointConf &object, std::vector< BodyConstraint > &bodies, const StepConf &step) |
| Solves velocity constraint. More...
|
|
bool | SolvePosition (const PulleyJointConf &object, std::vector< BodyConstraint > &bodies, const ConstraintSolverConf &conf) |
| Solves the position constraint. More...
|
|
constexpr auto | GetLengthA (const PulleyJointConf &object) noexcept |
| Free function for getting the length A value of the given configuration.
|
|
constexpr auto | GetLengthB (const PulleyJointConf &object) noexcept |
| Free function for getting the length B value of the given configuration.
|
|
constexpr auto | SetRatio (PulleyJointConf &object, Real value) noexcept |
| Free function for setting the ratio value of the given configuration.
|
|
void | Set (JointConf &def, const Joint &joint) noexcept |
| Sets the joint definition data for the given joint.
|
|
Pulley joint definition.
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant
.
- Note
- The force transmitted is scaled by the ratio.
- Warning
- the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.
- See also
- Joint, World::CreateJoint
- Examples
- PulleyJoint.cpp.