Box2D::b2FrictionJointDef - Friction joint definition.
my $joint_def = Box2D::b2FrictionJointDef->new(); $joint_def->Initialize( $body_a, $body_b, $anchor ); $joint_def->maxForce( $max_force ); $joint_def->maxTorque( $max_torque ); my $joint = $world->CreateJoint( $joint_def );
Friction joint definition.
Default constructor.
Returns a Box2D::b2FrictionJointDef
Box2D::b2FrictionJointDef
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
Parameters:
Box2D::b2Body $bodyA
Box2D::b2Body
$bodyA
Box2D::b2Body $bodyB
$bodyB
Box2D::b2Vec2 $anchor
Box2D::b2Vec2
$anchor
The local anchor point relative to bodyA's origin.
Box2D::b2Vec2 $localAnchorA (optional)
$localAnchorA
Returns a Box2D::b2Vec2
The local anchor point relative to bodyB's origin.
Box2D::b2Vec2 $localAnchorB (optional)
$localAnchorB
The maximum friction force in N.
float32 $maxForce (optional)
float32
$maxForce
Returns a float32
The maximum friction torque in N-m.
float32 $maxTorque (optional)
$maxTorque
Box2D
Box2D::b2JointDef
Box2D::b2FrictionJoint
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.