PackageBox2D.Dynamics.Joints
Classpublic class b2LineJointDef
Inheritanceb2LineJointDef Inheritance b2JointDef
Sourceb2LineJointDef.as

Line joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.

See also

b2LineJoint


Public Properties
 PropertyDefined by
 InheritedbodyA : b2Body
The first attached body.
b2JointDef
 InheritedbodyB : b2Body
The second attached body.
b2JointDef
 InheritedcollideConnected : Boolean
Set this flag to true if the attached bodies should collide.
b2JointDef
  enableLimit : Boolean
Enable/disable the joint limit.
b2LineJointDef
  enableMotor : Boolean
Enable/disable the joint motor.
b2LineJointDef
  localAnchorA : b2Vec2
The local anchor point relative to bodyA's origin.
b2LineJointDef
  localAnchorB : b2Vec2
The local anchor point relative to bodyB's origin.
b2LineJointDef
  localAxisA : b2Vec2
The local translation axis in bodyA.
b2LineJointDef
  lowerTranslation : Number
The lower translation limit, usually in meters.
b2LineJointDef
  maxMotorForce : Number
The maximum motor torque, usually in N-m.
b2LineJointDef
  motorSpeed : Number
The desired motor speed in radians per second.
b2LineJointDef
 Inheritedtype : int
The joint type is set automatically for concrete joint types.
b2JointDef
  upperTranslation : Number
The upper translation limit, usually in meters.
b2LineJointDef
 InheriteduserData : *
Use this to attach application specific data to your joints.
b2JointDef
Public Methods
 MethodDefined by
  
b2LineJointDef
  
Initialize(bA:b2Body, bB:b2Body, anchor:b2Vec2, axis:b2Vec2):void
b2LineJointDef
Property detail
enableLimitproperty
public var enableLimit:Boolean

Enable/disable the joint limit.

enableMotorproperty 
public var enableMotor:Boolean

Enable/disable the joint motor.

localAnchorAproperty 
public var localAnchorA:b2Vec2

The local anchor point relative to bodyA's origin.

localAnchorBproperty 
public var localAnchorB:b2Vec2

The local anchor point relative to bodyB's origin.

localAxisAproperty 
public var localAxisA:b2Vec2

The local translation axis in bodyA.

lowerTranslationproperty 
public var lowerTranslation:Number

The lower translation limit, usually in meters.

maxMotorForceproperty 
public var maxMotorForce:Number

The maximum motor torque, usually in N-m.

motorSpeedproperty 
public var motorSpeed:Number

The desired motor speed in radians per second.

upperTranslationproperty 
public var upperTranslation:Number

The upper translation limit, usually in meters.

Constructor detail
b2LineJointDef()constructor
public function b2LineJointDef()
Method detail
Initialize()method
public function Initialize(bA:b2Body, bB:b2Body, anchor:b2Vec2, axis:b2Vec2):voidParameters
bA:b2Body
 
bB:b2Body
 
anchor:b2Vec2
 
axis:b2Vec2