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
 Inheritedbody1 : b2Body
The first attached body.
b2JointDef
 Inheritedbody2 : 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
  localAnchor1 : b2Vec2
The local anchor point relative to body1's origin.
b2LineJointDef
  localAnchor2 : b2Vec2
The local anchor point relative to body2's origin.
b2LineJointDef
  localAxis1 : b2Vec2
The local translation axis in body1.
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(b1:b2Body, b2: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.

localAnchor1property 
public var localAnchor1:b2Vec2

The local anchor point relative to body1's origin.

localAnchor2property 
public var localAnchor2:b2Vec2

The local anchor point relative to body2's origin.

localAxis1property 
public var localAxis1:b2Vec2

The local translation axis in body1.

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(b1:b2Body, b2:b2Body, anchor:b2Vec2, axis:b2Vec2):voidParameters
b1:b2Body
 
b2:b2Body
 
anchor:b2Vec2
 
axis:b2Vec2