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

NAME

Box2D::b2WeldJointDef - Weld joint definition.

SYNOPSIS

  my $joint_def = Box2D::b2WeldJointDef->new();
  $joint_def->Initialize( $body1, $body2, $anchor );
  my $joint = $world->CreateJoint( $joint_def );

DESCRIPTION

Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.

METHODS

new()

Default constructor.

Returns a Box2D::b2WeldJointDef

Initialize( $body1, $body2, $anchor )

Initialize the bodies, anchors, and reference angle using a world anchor point.

Parameters:

  • Box2D::b2Body $body1

  • Box2D::b2Body $body2

  • Box2D::b2Vec2 $anchor

localAnchorA()

localAnchorA( $localAnchorA )

The local anchor point relative to body1's origin.

Parameters:

  • Box2D::b2Vec2 $localAnchorA (optional)

Returns a Box2D::b2Vec2

localAnchorB()

localAnchorB( $localAnchorB )

The local anchor point relative to body2's origin.

Parameters:

  • Box2D::b2Vec2 $localAnchorB (optional)

Returns a Box2D::b2Vec2

referenceAngle()

referenceAngle( $referenceAngle )

The body2 angle minus body1 angle in the reference state (radians).

Parameters:

  • float32 $referenceAngle (optional)

Returns a float32

SEE ALSO

BUGS

See "BUGS" in Box2D

AUTHORS

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE

See "COPYRIGHT & LICENSE" in Box2D