Jeffrey T. Palmer > Box2D-0.07 > Box2D::b2MouseJoint

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

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:

Returns a Box2D::b2Vec2

GetReactionTorque( $inv_dt )

Implements Box2D::b2Joint.

Parameters:

Returns a float32

GetTarget()

Returns a Box2D::b2Vec2

SetDampingRatio( $ratio )

Set/get the damping ratio (dimensionless).

Parameters:

SetFrequency( $hz )

Set/get the frequency in Hertz.

Parameters:

SetMaxForce( $force )

Set/get the maximum force in Newtons.

Parameters:

SetTarget( $target )

Use this to update the target point.

Parameters:

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: