Box2D::b2WeldJointDef - Weld joint definition.
my $joint_def = Box2D::b2WeldJointDef->new(); $joint_def->Initialize( $body1, $body2, $anchor ); my $joint = $world->CreateJoint( $joint_def );
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.
Default constructor.
Returns a Box2D::b2WeldJointDef
Box2D::b2WeldJointDef
Initialize the bodies, anchors, and reference angle using a world anchor point.
Parameters:
Box2D::b2Body $body1
Box2D::b2Body
$body1
Box2D::b2Body $body2
$body2
Box2D::b2Vec2 $anchor
Box2D::b2Vec2
$anchor
The local anchor point relative to body1's origin.
Box2D::b2Vec2 $localAnchorA (optional)
$localAnchorA
Returns a Box2D::b2Vec2
The local anchor point relative to body2's origin.
Box2D::b2Vec2 $localAnchorB (optional)
$localAnchorB
The body2 angle minus body1 angle in the reference state (radians).
float32 $referenceAngle (optional)
float32
$referenceAngle
Returns a float32
Box2D
Box2D::b2WeldJoint
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.