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

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Box2D::b2FrictionJoint - Provides translational and angular friction.

SYNOPSIS ^

  my $joint = $world->CreateJoint( $joint_def );
  $joint->SetMaxForce( $max_force );
  $joint->SetMaxTorque( $max_torque );

DESCRIPTION ^

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.

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

GetMaxForce()

Get the maximum friction force in N.

Returns a float32

GetMaxTorque()

Get the maximum friction torque in N*m.

Returns a float32

GetReactionForce( $inv_dt )

Get the reaction force on body2 at the joint anchor in Newtons. Implements Box2D::b2Joint.

Parameters:

Returns a Box2D::b2Vec2

GetReactionTorque( $inv_dt )

Get the reaction torque on body2 in N*m. Implements Box2D::b2Joint.

Parameters:

Returns a float32

SetMaxForce( $force )

Set the maximum friction force in N.

Parameters:

SetMaxTorque( $torque )

Set the maximum friction torque in N*m.

Parameters:

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: