-
-
15 Apr 2018 06:15:26 UTC
- Distribution: Box2D
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (91)
- Testers (360 / 47 / 0)
- Kwalitee
Bus factor: 2- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (130.44KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- EnableLimit( $flag )
- EnableMotor( $flag )
- GetAnchorA()
- GetAnchorB()
- GetJointSpeed()
- GetJointTranslation()
- GetLowerLimit()
- GetMotorForce()
- GetMotorSpeed()
- GetReactionForce( $inv_dt )
- GetReactionTorque( $inv_dt )
- GetUpperLimit()
- IsLimitEnabled()
- IsMotorEnabled()
- SetLimits( $lower, $upper )
- SetMaxMotorForce( $force )
- SetMotorSpeed( $speed )
- SEE ALSO
- BUGS
- AUTHORS
- COPYRIGHT & LICENSE
NAME
Box2D::b2PrismaticJoint - Provides one degree of freedom: translation along an axis.
SYNOPSIS
my $joint = $world->CreateJoint( $joint_def ); $joint->EnableMotor( 1 ); $joint->SetMaxMotorForce( $max_force );
DESCRIPTION
A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. 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.
METHODS
EnableLimit( $flag )
Enable/disable the joint limit.
Parameters:
bool
$flag
EnableMotor( $flag )
Enable/disable the joint motor.
Parameters:
bool
$flag
GetAnchorA()
Get the anchor point on bodyA in world coordinates. Implements
Box2D::b2Joint
.Returns a
Box2D::b2Vec2
GetAnchorB()
Get the anchor point on bodyB in world coordinates. Implements
Box2D::b2Joint
.Returns a
Box2D::b2Vec2
GetJointSpeed()
Get the current joint translation speed, usually in meters per second.
Returns a
float32
GetJointTranslation()
Get the current joint translation, usually in meters.
Returns a
float32
GetLowerLimit()
Get the lower joint limit, usually in meters.
Returns a
float32
GetMotorForce()
Get the current motor force, usually in N.
Returns a
float32
GetMotorSpeed()
Get the motor speed, usually in meters per second.
Returns a
float32
GetReactionForce( $inv_dt )
Get the reaction force on body2 at the joint anchor in Newtons. Implements
Box2D::b2Joint
.Parameters:
float32
$inv_dt
Returns a
Box2D::b2Vec2
GetReactionTorque( $inv_dt )
Get the reaction torque on body2 in N*m. Implements
Box2D::b2Joint
.Parameters:
float32
$inv_dt
Returns a
float32
GetUpperLimit()
Get the upper joint limit, usually in meters.
Returns a
float32
IsLimitEnabled()
Is the joint limit enabled?
Returns a
bool
IsMotorEnabled()
Is the joint motor enabled?
Returns a
bool
SetLimits( $lower, $upper )
Set the joint limits, usually in meters.
Parameters:
float32
$lower
float32
$upper
SetMaxMotorForce( $force )
Set the maximum motor force, usually in N.
Parameters:
float32
$force
SetMotorSpeed( $speed )
Set the motor speed, usually in meters per second.
Parameters:
float32
$speed
SEE ALSO
BUGS
See "BUGS" in Box2D
AUTHORS
COPYRIGHT & LICENSE
Module Install Instructions
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm Box2D
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.