Box2D::b2GearJoint - Connects two joints together.
my $joint = $world->CreateJoint( $joint_def ); $joint->SetRatio( $ratio );
A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio * coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length.
Warning: The revolute and prismatic joints must be attached to fixed bodies (which must be body1 on those joints).
Get the anchor point on bodyA in world coordinates. Implements Box2D::b2Joint.
Box2D::b2Joint
Returns a Box2D::b2Vec2
Box2D::b2Vec2
Get the anchor point on bodyB in world coordinates. Implements Box2D::b2Joint.
Returns a float32
float32
Get the reaction force on body2 at the joint anchor in Newtons. Implements Box2D::b2Joint.
Parameters:
float32 $inv_dt
$inv_dt
Get the reaction torque on body2 in N*m. Implements Box2D::b2Joint.
Set/Get the gear ratio.
float32 $ratio
$ratio
Box2D
Box2D::b2GearJointDef
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.