API Documentation for:
Show:

b2PulleyJointDef Class

Extends B2JointDef
Defined in: b2PulleyJointDef:19
Module: Joints

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.

Constructor

b2PulleyJointDef

()

Defined in b2PulleyJointDef:19

Methods

initialize

(
  • bodyA
  • bodyB
  • groundA
  • groundB
  • anchorA
  • anchorB
  • ratio
)
Void public

Defined in initialize:171

Parameters:

  • bodyA B2Body
  • bodyB B2Body
  • groundA B2Vec2
  • groundB B2Vec2
  • anchorA B2Vec2
  • anchorB B2Vec2
  • ratio Number

Returns:

Void:

Properties

collideConnected

Boolean public

Default: true

groundAnchorA

B2Vec2 public

Defined in groundAnchorA:51

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

Default: ( -1, 1 )

groundAnchorB

B2Vec2 public

Defined in groundAnchorB:62

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

Default: ( 1, 1 )

lengthA

Float public

Defined in lengthA:104

The a reference length for the segment attached to bodyA.

Default: 0.0

lengthB

Float public

Defined in lengthB:114

The a reference length for the segment attached to bodyB.

Default: 0.0

localAnchorA

B2Vec2 public

Defined in localAnchorA:73

The local anchor point relative to bodyA's origin.

Default: ( -1, 0 )

localAnchorB

B2Vec2 public

Defined in localAnchorB:83

The local anchor point relative to bodyB's origin.

Default: ( 1, 0 )

ratio

Float public

Defined in ratio:124

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

Default: 1.0

type

Int public

Defined in type:95

Default: b2Joint.e_pulleyJoint