PackageBox2D.Dynamics.Joints
Classpublic class b2PulleyJointDef
Inheritanceb2PulleyJointDef Inheritance b2JointDef
Sourceb2PulleyJointDef.as

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.

See also

b2PulleyJoint


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
  groundAnchor1 : b2Vec2
The first ground anchor in world coordinates.
b2PulleyJointDef
  groundAnchor2 : b2Vec2
The second ground anchor in world coordinates.
b2PulleyJointDef
  length1 : Number
The a reference length for the segment attached to body1.
b2PulleyJointDef
  length2 : Number
The a reference length for the segment attached to body2.
b2PulleyJointDef
  localAnchor1 : b2Vec2
The local anchor point relative to body1's origin.
b2PulleyJointDef
  localAnchor2 : b2Vec2
The local anchor point relative to body2's origin.
b2PulleyJointDef
  maxLength1 : Number
The maximum length of the segment attached to body1.
b2PulleyJointDef
  maxLength2 : Number
The maximum length of the segment attached to body2.
b2PulleyJointDef
  ratio : Number
The pulley ratio, used to simulate a block-and-tackle.
b2PulleyJointDef
 Inheritedtype : int
The joint type is set automatically for concrete joint types.
b2JointDef
 InheriteduserData : *
Use this to attach application specific data to your joints.
b2JointDef
Public Methods
 MethodDefined by
  
b2PulleyJointDef
  
Initialize(b1:b2Body, b2:b2Body, ga1:b2Vec2, ga2:b2Vec2, anchor1:b2Vec2, anchor2:b2Vec2, r:Number):void
b2PulleyJointDef
Property detail
groundAnchor1property
public var groundAnchor1:b2Vec2

The first ground anchor in world coordinates. This point never moves.

groundAnchor2property 
public var groundAnchor2:b2Vec2

The second ground anchor in world coordinates. This point never moves.

length1property 
public var length1:Number

The a reference length for the segment attached to body1.

length2property 
public var length2:Number

The a reference length for the segment attached to body2.

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.

maxLength1property 
public var maxLength1:Number

The maximum length of the segment attached to body1.

maxLength2property 
public var maxLength2:Number

The maximum length of the segment attached to body2.

ratioproperty 
public var ratio:Number

The pulley ratio, used to simulate a block-and-tackle.

Constructor detail
b2PulleyJointDef()constructor
public function b2PulleyJointDef()
Method detail
Initialize()method
public function Initialize(b1:b2Body, b2:b2Body, ga1:b2Vec2, ga2:b2Vec2, anchor1:b2Vec2, anchor2:b2Vec2, r:Number):voidParameters
b1:b2Body
 
b2:b2Body
 
ga1:b2Vec2
 
ga2:b2Vec2
 
anchor1:b2Vec2
 
anchor2:b2Vec2
 
r:Number