Jeffrey T. Palmer > Box2D > Box2D::b2MouseJointDef

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Box2D::b2MouseJointDef - Mouse joint definition.

SYNOPSIS ^

  my $joint_def = Box2D::b2MouseJointDef->new();
  $joint_def->bodyA( $body_a );
  $joint_def->bodyB( $body_b );
  $joint_def->target( $target );
  $joint_def->maxForce( $max_force );
  my $joint = $world->CreateJoint( $joint_def );

DESCRIPTION ^

Mouse joint definition. This requires a world target point, tuning parameters, and the time step.

METHODS ^

new()

Default constructor.

Returns a Box2D::b2MouseJointDef

dampingRatio()

dampingRatio( $dampingRatio )

The damping ratio. 0 = no damping, 1 = critical damping.

Parameters:

Returns a float32

frequencyHz()

frequencyHz( $frequencyHz )

The response speed.

Parameters:

Returns a float32

maxForce()

maxForce( $maxForce )

The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).

Parameters:

Returns a float32

target()

target( $target )

The initial world target point. This is assumed to coincide with the body anchor initially.

Parameters:

Returns a Box2D::b2Vec2

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: