Box2D
2.2.1
Box2D API Reference for Kobold2D developers
|
#include <b2PulleyJoint.h>
Public Member Functions | |
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float32 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. | |
float32 | lengthA |
The a reference length for the segment attached to bodyA. | |
float32 | lengthB |
The a reference length for the segment attached to bodyB. | |
float32 | ratio |
The pulley ratio, used to simulate a block-and-tackle. |
Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
void b2PulleyJointDef::Initialize | ( | b2Body * | bodyA, |
b2Body * | bodyB, | ||
const b2Vec2 & | groundAnchorA, | ||
const b2Vec2 & | groundAnchorB, | ||
const b2Vec2 & | anchorA, | ||
const b2Vec2 & | anchorB, | ||
float32 | ratio | ||
) |
Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
The first ground anchor in world coordinates. This point never moves.
The second ground anchor in world coordinates. This point never moves.
float32 b2PulleyJointDef::lengthA |
The a reference length for the segment attached to bodyA.
float32 b2PulleyJointDef::lengthB |
The a reference length for the segment attached to bodyB.
The local anchor point relative to bodyA's origin.
The local anchor point relative to bodyB's origin.
float32 b2PulleyJointDef::ratio |
The pulley ratio, used to simulate a block-and-tackle.