-
-
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
Box2D::b2MouseJoint - Make a point on a body track a specified point.
SYNOPSIS
my $joint = $world->CreateJoint( $joint_def ); $joint->SetTarget( $target );
DESCRIPTION
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.
NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.
METHODS
GetAnchorA()
Implements
Box2D::b2Joint
.Returns a
Box2D::b2Vec2
GetAnchorB()
Implements
Box2D::b2Joint
.Returns a
Box2D::b2Vec2
GetDampingRatio()
Returns a
float32
GetFrequency()
Returns a
float32
GetMaxForce()
Returns a
float32
GetReactionForce( $inv_dt )
Implements
Box2D::b2Joint
.Parameters:
float32
$inv_dt
Returns a
Box2D::b2Vec2
GetReactionTorque( $inv_dt )
Implements
Box2D::b2Joint
.Parameters:
float32
$inv_dt
Returns a
float32
GetTarget()
Returns a
Box2D::b2Vec2
SetDampingRatio( $ratio )
Set/get the damping ratio (dimensionless).
Parameters:
float32
$ratio
SetFrequency( $hz )
Set/get the frequency in Hertz.
Parameters:
float32
$hz
SetMaxForce( $force )
Set/get the maximum force in Newtons.
Parameters:
float32
$force
SetTarget( $target )
Use this to update the target point.
Parameters:
Box2D::b2Vec2
$target
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.