Class b2PullyJointDef

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

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): b2PullyJointDef

Constructor.

Returns

b2PullyJointDef

Properties

public bodyA: b2Body

The first attached body.

public bodyB: b2Body

The second attached body.

public collideConnected: boolean

Set this flag to true if the attached bodies should collide.

public groundAnchorA: b2Vec2

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

public groundAnchorB: b2Vec2

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

public lengthA: number

The a reference length for the segment attached to bodyA.

public lengthB: number

The a reference length for the segment attached to bodyB.

public localAnchorA: b2Vec2

The local anchor point relative to body1's origin.

public localAnchorB: b2Vec2

The local anchor point relative to body2's origin.

public maxLengthA: number

The maximum length of the segment attached to bodyA.

public maxLengthB: number

The maximum length of the segment attached to bodyB.

public ratio: number

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

public type: number

The joint type is set automatically for concrete joint types.

public userData: any

Use this to attach application specific data to your joints.

Methods

public Initialize(bA: b2Body, bB: b2Body, gaA: b2Vec2, gaB: b2Vec2, anchorA: b2Vec2, anchorB: b2Vec2)

Initialize the bodies, anchors, and length using the world anchors.

Parameters