Jeffrey T. Palmer > Box2D-0.07 > Box2D::b2PulleyJointDef

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

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:

groundAnchorA()

groundAnchorA( $groundAnchorA )

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

Parameters:

Returns a Box2D::b2Vec2

groundAnchorB()

groundAnchorB( $groundAnchorB )

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

Parameters:

Returns a Box2D::b2Vec2

lengthA()

lengthA( $lengthA )

The a reference length for the segment attached to bodyA.

Parameters:

Returns a float32

lengthB()

lengthB( $lengthB )

The a reference length for the segment attached to bodyB.

Parameters:

Returns a float32

localAnchorA()

localAnchorA( $localAnchorA )

The local anchor point relative to bodyA's origin.

Parameters:

Returns a Box2D::b2Vec2

localAnchorB()

localAnchorB( $localAnchorB )

The local anchor point relative to bodyB's origin.

Parameters:

Returns a Box2D::b2Vec2

maxLengthA()

maxLengthA( $maxLengthA )

The maximum length of the segment attached to bodyA.

Parameters:

Returns a float32

maxLengthB()

maxLengthB( $maxLengthB )

The maximum length of the segment attached to bodyB.

Parameters:

Returns a float32

ratio()

ratio( $ratio )

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

Parameters:

Returns a float32

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: