Box2D::b2GearJointDef - Gear joint definition.
my $joint_def = Box2D::b2GearJointDef->new(); $joint_def->bodyA( $body_a ); $joint_def->bodyB( $body_b ); $joint_def->joint1( $joint1 ); $joint_def->joint2( $joint2 ); $joint_def->ratio( $ratio ); my $joint = $world->CreateJoint( $joint_def );
Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.
Default constructor.
Returns a Box2D::b2GearJointDef
Box2D::b2GearJointDef
The first revolute/prismatic joint attached to the gear joint.
Parameters:
Box2D::b2Joint* $joint1 (optional)
Box2D::b2Joint*
$joint1
Returns a Box2D::b2Joint*
The second revolute/prismatic joint attached to the gear joint.
Box2D::b2Joint* $joint2 (optional)
$joint2
The gear ratio.
See also: Box2D::b2GearJoint for explanation.
float32 $ratio (optional)
float32
$ratio
Returns a float32
Box2D
Box2D::b2GearJoint
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.