Box2D::b2PulleyJointDef - Pulley joint definition.
my $joint_def = Box2D::b2PulleyJointDef->new(); $joint_def->Initialize( $bodyA, $bodyB, $groundAnchorA, $groundAnchorB, $anchorA, $anchorB, $ratio ); my $joint = $world->CreateJoint( $joint_def );
Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.
Default constructor.
Returns a Box2D::b2PulleyJointDef
Box2D::b2PulleyJointDef
Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
Parameters:
Box2D::b2Body $bodyA
Box2D::b2Body
$bodyA
Box2D::b2Body $bodyB
$bodyB
Box2D::b2Vec2 $groundAnchorA
Box2D::b2Vec2
$groundAnchorA
Box2D::b2Vec2 $groundAnchorB
$groundAnchorB
Box2D::b2Vec2 $anchorA
$anchorA
Box2D::b2Vec2 $anchorB
$anchorB
float32 $ratio
float32
$ratio
The first ground anchor in world coordinates. This point never moves.
Box2D::b2Vec2 $groundAnchorA (optional)
Returns a Box2D::b2Vec2
The second ground anchor in world coordinates. This point never moves.
Box2D::b2Vec2 $groundAnchorB (optional)
The a reference length for the segment attached to bodyA.
float32 $lengthA (optional)
$lengthA
Returns a float32
The a reference length for the segment attached to bodyB.
float32 $lengthB (optional)
$lengthB
The local anchor point relative to bodyA's origin.
Box2D::b2Vec2 $localAnchorA (optional)
$localAnchorA
The local anchor point relative to bodyB's origin.
Box2D::b2Vec2 $localAnchorB (optional)
$localAnchorB
The maximum length of the segment attached to bodyA.
float32 $maxLengthA (optional)
$maxLengthA
The maximum length of the segment attached to bodyB.
float32 $maxLengthB (optional)
$maxLengthB
The pulley ratio, used to simulate a block-and-tackle.
float32 $ratio (optional)
Box2D
Box2D::b2PulleyJoint
Box2D::b2JointDef
Box2D::b2World
See "BUGS" in Box2D
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.