NAME

Box2D::b2Joint - Base joint class.

SYNOPSIS

  # Don't use this class directly, use a subclass.

DESCRIPTION

The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.

METHODS

GetAnchorA()

Get the anchor point on bodyA in world coordinates. Implemented in Box2D::b2DistanceJoint, Box2D::b2FrictionJoint, Box2D::b2GearJoint, Box2D::b2LineJoint, Box2D::b2MouseJoint, Box2D::b2PrismaticJoint, Box2D::b2PulleyJoint, Box2D::b2RevoluteJoint, and Box2D::b2WeldJoint.

Returns a Box2D::b2Vec2

GetAnchorB()

Get the anchor point on bodyB in world coordinates. Implemented in Box2D::b2DistanceJoint, Box2D::b2FrictionJoint, Box2D::b2GearJoint, Box2D::b2LineJoint, Box2D::b2MouseJoint, Box2D::b2PrismaticJoint, Box2D::b2PulleyJoint, Box2D::b2RevoluteJoint, and Box2D::b2WeldJoint.

Returns a Box2D::b2Vec2

GetBodyA()

Get the first body attached to this joint.

Returns a Box2D::b2Body

GetBodyB()

Get the second body attached to this joint.

Returns a Box2D::b2Body

GetNext()

Get the next joint the world joint list.

Returns a Box2D::b2Joint

GetReactionForce( $inv_dt )

Get the reaction force on body2 at the joint anchor in Newtons. Implemented in Box2D::b2DistanceJoint, Box2D::b2FrictionJoint, Box2D::b2GearJoint, Box2D::b2LineJoint, Box2D::b2MouseJoint, Box2D::b2PrismaticJoint, Box2D::b2PulleyJoint, Box2D::b2RevoluteJoint, and Box2D::b2WeldJoint.

Parameters:

  • float32 $inv_dt

Returns a Box2D::b2Vec2

GetReactionTorque( $inv_dt )

Get the reaction torque on body2 in N*m. Implemented in Box2D::b2DistanceJoint, Box2D::b2FrictionJoint, Box2D::b2GearJoint, Box2D::b2LineJoint, Box2D::b2MouseJoint, Box2D::b2PrismaticJoint, Box2D::b2PulleyJoint, Box2D::b2RevoluteJoint, and Box2D::b2WeldJoint.

Parameters:

  • float32 $inv_dt

Returns a float32

GetType()

Get the type of the concrete joint.

Returns a Box2D::b2JointType

GetUserData()

Get the user data pointer.

IsActive()

Short-cut function to determine if either body is inactive.

Returns a bool

SetUserData( $data )

Set the user data pointer.

Parameters:

  • scalar $data

SEE ALSO

BUGS

See "BUGS" in Box2D

AUTHORS

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE

See "COPYRIGHT & LICENSE" in Box2D