pub struct b2PulleyJoint { /* private fields */ }Expand description
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, 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.
Implementations§
Source§impl b2PulleyJoint
impl b2PulleyJoint
Sourcepub fn GetRatio(self: &b2PulleyJoint) -> f32
pub fn GetRatio(self: &b2PulleyJoint) -> f32
Get the pulley ratio.
pub fn GetAnchorA(self: &b2PulleyJoint) -> b2Vec2
pub fn GetAnchorB(self: &b2PulleyJoint) -> b2Vec2
pub fn GetReactionForce(self: &b2PulleyJoint, inv_dt: f32) -> b2Vec2
pub fn GetReactionTorque(self: &b2PulleyJoint, inv_dt: f32) -> f32
Sourcepub fn Dump(self: Pin<&mut b2PulleyJoint>)
pub fn Dump(self: Pin<&mut b2PulleyJoint>)
Dump joint to dmLog
Sourcepub fn ShiftOrigin(self: Pin<&mut b2PulleyJoint>, newOrigin: &b2Vec2)
pub fn ShiftOrigin(self: Pin<&mut b2PulleyJoint>, newOrigin: &b2Vec2)
Implement b2Joint::ShiftOrigin
Source§impl b2PulleyJoint
impl b2PulleyJoint
Sourcepub fn GetGroundAnchorA(&self) -> b2Vec2
pub fn GetGroundAnchorA(&self) -> b2Vec2
Get the first ground anchor.
Sourcepub fn GetGroundAnchorB(&self) -> b2Vec2
pub fn GetGroundAnchorB(&self) -> b2Vec2
Get the second ground anchor.
Sourcepub fn GetLengthA(&self) -> f32
pub fn GetLengthA(&self) -> f32
Get the current length of the segment attached to bodyA.
Sourcepub fn GetLengthB(&self) -> f32
pub fn GetLengthB(&self) -> f32
Get the current length of the segment attached to bodyB.
Sourcepub fn GetCurrentLengthA(&self) -> f32
pub fn GetCurrentLengthA(&self) -> f32
Get the current length of the segment attached to bodyA.
Sourcepub fn GetCurrentLengthB(&self) -> f32
pub fn GetCurrentLengthB(&self) -> f32
Get the current length of the segment attached to bodyB.
Trait Implementations§
Source§impl AsRef<b2Joint> for b2PulleyJoint
impl AsRef<b2Joint> for b2PulleyJoint
Source§fn as_ref(self: &b2PulleyJoint) -> &b2Joint
fn as_ref(self: &b2PulleyJoint) -> &b2Joint
Source§impl CopyNew for b2PulleyJoint
impl CopyNew for b2PulleyJoint
Source§unsafe fn copy_new(
other: &b2PulleyJoint,
this: Pin<&mut MaybeUninit<b2PulleyJoint>>,
)
unsafe fn copy_new( other: &b2PulleyJoint, this: Pin<&mut MaybeUninit<b2PulleyJoint>>, )
Synthesized copy constructor.
Source§impl Drop for b2PulleyJoint
impl Drop for b2PulleyJoint
Source§fn drop(self: &mut b2PulleyJoint)
fn drop(self: &mut b2PulleyJoint)
Synthesized destructor.