-
-
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::b2DistanceJoint - Constrains two bodies at a fixed distance.
SYNOPSIS
my $joint = $world->CreateJoint( $joint_def ); my $anchor_a = $joint->GetAnchorA(); my $anchor_b = $joint->GetAnchorB();
DESCRIPTION
A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
METHODS
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
GetDampingRatio()
Returns a
float32
GetFrequency()
Returns a
float32
GetLength()
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
SetDampingRatio( $ratio )
Parameters:
float32
$ratio
SetFrequency( $hz )
Parameters:
float32
$hz
SetLength( $length )
Set/get the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero.
Parameters:
float32
$length
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.