The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Box2D::b2PulleyJointDef - Pulley joint definition.

SYNOPSIS

  my $joint_def = Box2D::b2PulleyJointDef->new();
  $joint_def->Initialize( $bodyA, $bodyB, $groundAnchorA,
      $groundAnchorB, $anchorA, $anchorB, $ratio );
  my $joint = $world->CreateJoint( $joint_def );

DESCRIPTION

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.

METHODS

Default constructor.

Returns a Box2D::b2PulleyJointDef

Initialize( $bodyA, $bodyB, $groundAnchorA, $groundAnchorB, $anchorA, $anchorB, $ratio )

Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.

Parameters:

  • Box2D::b2Body $bodyA

  • Box2D::b2Body $bodyB

  • Box2D::b2Vec2 $groundAnchorA

  • Box2D::b2Vec2 $groundAnchorB

  • Box2D::b2Vec2 $anchorA

  • Box2D::b2Vec2 $anchorB

  • float32 $ratio

groundAnchorA()

groundAnchorA( $groundAnchorA )

The first ground anchor in world coordinates. This point never moves.

Parameters:

  • Box2D::b2Vec2 $groundAnchorA (optional)

Returns a Box2D::b2Vec2

groundAnchorB()

groundAnchorB( $groundAnchorB )

The second ground anchor in world coordinates. This point never moves.

Parameters:

  • Box2D::b2Vec2 $groundAnchorB (optional)

Returns a Box2D::b2Vec2

lengthA()

lengthA( $lengthA )

The a reference length for the segment attached to bodyA.

Parameters:

  • float32 $lengthA (optional)

Returns a float32

lengthB()

lengthB( $lengthB )

The a reference length for the segment attached to bodyB.

Parameters:

  • float32 $lengthB (optional)

Returns a float32

localAnchorA()

localAnchorA( $localAnchorA )

The local anchor point relative to bodyA's origin.

Parameters:

  • Box2D::b2Vec2 $localAnchorA (optional)

Returns a Box2D::b2Vec2

localAnchorB()

localAnchorB( $localAnchorB )

The local anchor point relative to bodyB's origin.

Parameters:

  • Box2D::b2Vec2 $localAnchorB (optional)

Returns a Box2D::b2Vec2

maxLengthA()

maxLengthA( $maxLengthA )

The maximum length of the segment attached to bodyA.

Parameters:

  • float32 $maxLengthA (optional)

Returns a float32

maxLengthB()

maxLengthB( $maxLengthB )

The maximum length of the segment attached to bodyB.

Parameters:

  • float32 $maxLengthB (optional)

Returns a float32

ratio()

ratio( $ratio )

The pulley ratio, used to simulate a block-and-tackle.

Parameters:

  • float32 $ratio (optional)

Returns a float32

SEE ALSO

BUGS

See "BUGS" in Box2D

AUTHORS

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE

See "COPYRIGHT & LICENSE" in Box2D