PackageBox2D.Dynamics.Joints
Classpublic class b2Joint
Subclassesb2DistanceJoint, b2FrictionJoint, b2GearJoint, b2LineJoint, b2MouseJoint, b2PrismaticJoint, b2PulleyJoint, b2RevoluteJoint, b2WeldJoint
Sourceb2Joint.as

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

See also

b2JointDef


Public Methods
 MethodDefined by
  
Get the anchor point on bodyA in world coordinates.
b2Joint
  
Get the anchor point on bodyB in world coordinates.
b2Joint
  
Get the first body attached to this joint.
b2Joint
  
Get the second body attached to this joint.
b2Joint
  
Get the next joint the world joint list.
b2Joint
  
GetReactionForce(inv_dt:Number):b2Vec2
Get the reaction force on body2 at the joint anchor in Newtons.
b2Joint
  
GetReactionTorque(inv_dt:Number):Number
Get the reaction torque on body2 in N.
b2Joint
  
GetType():int
Get the type of the concrete joint.
b2Joint
  
Get the user data pointer.
b2Joint
  
IsActive():Boolean
Short-cut function to determine if either body is inactive.
b2Joint
  
SetUserData(data:*):void
Set the user data pointer.
b2Joint
Method detail
GetAnchorA()method
public function GetAnchorA():b2Vec2

Get the anchor point on bodyA in world coordinates.

Returns
b2Vec2
GetAnchorB()method 
public function GetAnchorB():b2Vec2

Get the anchor point on bodyB in world coordinates.

Returns
b2Vec2
GetBodyA()method 
public function GetBodyA():b2Body

Get the first body attached to this joint.

Returns
b2Body
GetBodyB()method 
public function GetBodyB():b2Body

Get the second body attached to this joint.

Returns
b2Body
GetNext()method 
public function GetNext():b2Joint

Get the next joint the world joint list.

Returns
b2Joint
GetReactionForce()method 
public function GetReactionForce(inv_dt:Number):b2Vec2

Get the reaction force on body2 at the joint anchor in Newtons.

Parameters
inv_dt:Number

Returns
b2Vec2
GetReactionTorque()method 
public function GetReactionTorque(inv_dt:Number):Number

Get the reaction torque on body2 in N.

Parameters
inv_dt:Number

Returns
Number
GetType()method 
public function GetType():int

Get the type of the concrete joint.

Returns
int
GetUserData()method 
public function GetUserData():*

Get the user data pointer.

Returns
*
IsActive()method 
public function IsActive():Boolean

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

Returns
Boolean
SetUserData()method 
public function SetUserData(data:*):void

Set the user data pointer.

Parameters
data:*