PackageBox2D.Dynamics.Joints
Classpublic class b2PrismaticJointDef
Inheritanceb2PrismaticJointDef Inheritance b2JointDef
Sourceb2PrismaticJointDef.as

Prismatic 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

b2PrismaticJoint


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.
b2PrismaticJointDef
  enableMotor : Boolean
Enable/disable the joint motor.
b2PrismaticJointDef
  localAnchorA : b2Vec2
The local anchor point relative to bodyA's origin.
b2PrismaticJointDef
  localAnchorB : b2Vec2
The local anchor point relative to bodyB's origin.
b2PrismaticJointDef
  localAxisA : b2Vec2
The local translation axis in body1.
b2PrismaticJointDef
  lowerTranslation : Number
The lower translation limit, usually in meters.
b2PrismaticJointDef
  maxMotorForce : Number
The maximum motor torque, usually in N-m.
b2PrismaticJointDef
  motorSpeed : Number
The desired motor speed in radians per second.
b2PrismaticJointDef
  referenceAngle : Number
The constrained angle between the bodies: bodyB_angle - bodyA_angle.
b2PrismaticJointDef
 Inheritedtype : int
The joint type is set automatically for concrete joint types.
b2JointDef
  upperTranslation : Number
The upper translation limit, usually in meters.
b2PrismaticJointDef
 InheriteduserData : *
Use this to attach application specific data to your joints.
b2JointDef
Public Methods
 MethodDefined by
  
b2PrismaticJointDef
  
Initialize(bA:b2Body, bB:b2Body, anchor:b2Vec2, axis:b2Vec2):void
b2PrismaticJointDef
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 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.

referenceAngleproperty 
public var referenceAngle:Number

The constrained angle between the bodies: bodyB_angle - bodyA_angle.

upperTranslationproperty 
public var upperTranslation:Number

The upper translation limit, usually in meters.

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