b2PulleyJointDef Class
Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
Constructor
b2PulleyJointDef
()
Item Index
Methods
Methods
initialize
(
Void
public
-
bodyA
-
bodyB
-
groundA
-
groundB
-
anchorA
-
anchorB
-
ratio
Parameters:
-
bodyA
B2Body -
bodyB
B2Body -
groundA
B2Vec2 -
groundB
B2Vec2 -
anchorA
B2Vec2 -
anchorB
B2Vec2 -
ratio
Number
Returns:
Void:
Properties
groundAnchorA
B2Vec2
public
The first ground anchor in world coordinates. This point never moves.
Default: ( -1, 1 )
groundAnchorB
B2Vec2
public
The second ground anchor in world coordinates. This point never moves.
Default: ( 1, 1 )
lengthA
Float
public
The a reference length for the segment attached to bodyA.
Default: 0.0
lengthB
Float
public
The a reference length for the segment attached to bodyB.
Default: 0.0
localAnchorA
B2Vec2
public
The local anchor point relative to bodyA's origin.
Default: ( -1, 0 )
localAnchorB
B2Vec2
public
The local anchor point relative to bodyB's origin.
Default: ( 1, 0 )
ratio
Float
public
The pulley ratio, used to simulate a block-and-tackle.
Default: 1.0
type
Int
public
Default: b2Joint.e_pulleyJoint