Box2D::b2LineJoint - Provides two degrees of freedom: translation along an axis and rotation in the plane.
my $joint - $world->CreateJoint( $joint_def ); $joint->EnableLimit( 1 ); $joint->EnableMotor( 1 ); $joint->SetMotorSpeed( $speed );
A line joint. This joint provides two degrees of freedom: translation along an axis fixed in body1 and rotation in the plane. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
Enable/disable the joint limit.
Parameters:
bool $flag
bool
$flag
Enable/disable the joint motor.
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.
Get the current joint translation speed, usually in meters per second.
Returns a float32
float32
Get the current joint translation, usually in meters.
Get the lower joint limit, usually in meters.
Get the current motor force, usually in N.
Get the motor speed, usually in meters per second.
Get the reaction force on body2 at the joint anchor in Newtons. Implements Box2D::b2Joint.
float32 $inv_dt
$inv_dt
Get the reaction torque on body2 in N*m. Implements Box2D::b2Joint.
Get the upper joint limit, usually in meters.
Is the joint limit enabled?
Returns a bool
Is the joint motor enabled?
Set the joint limits, usually in meters.
float32 $lower
$lower
float32 $upper
$upper
Set/Get the maximum motor force, usually in N.
float32 $force
$force
Set the motor speed, usually in meters per second.
float32 $speed
$speed
Box2D
Box2D::b2LineJointDef
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.