Box2D: b2PulleyJointDef Struct Reference

| Box2D 2.4.1 A 2D physics engine for games

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
b2PulleyJointDef Struct Reference

`#include <b2_pulley_joint.h>`

Inheritance diagram for b2PulleyJointDef:

## Public Member Functions
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float ratio)
| Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.

## Public Attributes
b2Vec2 | groundAnchorA
| The first ground anchor in world coordinates. This point never moves.
b2Vec2 | groundAnchorB
| The second ground anchor in world coordinates. This point never moves.
b2Vec2 | localAnchorA
| The local anchor point relative to bodyA's origin.
b2Vec2 | localAnchorB
| The local anchor point relative to bodyB's origin.
float | lengthA
| The a reference length for the segment attached to bodyA.
float | lengthB
| The a reference length for the segment attached to bodyB.
float | ratio
| The pulley ratio, used to simulate a block-and-tackle.
Public Attributes inherited from b2JointDef
b2JointType | type
| The joint type is set automatically for concrete joint types.
b2JointUserData | userData
| Use this to attach application specific data to your joints.
b2Body * | bodyA
| The first attached body.
b2Body * | bodyB
| The second attached body.
bool | collideConnected
| Set this flag to true if the attached bodies should collide.

## Detailed Description

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

The documentation for this struct was generated from the following file:

- /build/box2d/src/box2d-2.4.1/include/box2d/b2_pulley_joint.h