NAME
Box2D::b2PulleyJoint - Connects two bodies and two ground points.
SYNOPSIS
my $joint = $world->CreateJoint( $joint_def );
my $ratio = $joint->GetRatio();
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. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.
METHODS
GetAnchorA()
Get the anchor point on bodyA in world coordinates. Implements Box2D::b2Joint
.
Returns a Box2D::b2Vec2
GetAnchorB()
Get the anchor point on bodyB in world coordinates. Implements Box2D::b2Joint
.
Returns a Box2D::b2Vec2
GetGroundAnchorA()
Get the first ground anchor.
Returns a Box2D::b2Vec2
GetGroundAnchorB()
Get the second ground anchor.
Returns a Box2D::b2Vec2
GetLength1()
Get the current length of the segment attached to body1.
Returns a float32
GetLength2()
Get the current length of the segment attached to body2.
Returns a float32
GetRatio()
Get the pulley ratio.
Returns a float32
GetReactionForce( $inv_dt )
Get the reaction force on body2 at the joint anchor in Newtons. Implements Box2D::b2Joint
.
Parameters:
float32
$inv_dt
Returns a Box2D::b2Vec2
GetReactionTorque( $inv_dt )
Get the reaction torque on body2 in N*m. Implements Box2D::b2Joint
.
Parameters:
float32
$inv_dt
Returns a float32
SEE ALSO
BUGS
See "BUGS" in Box2D