#include <b2PulleyJoint.h>
Public Member Functions | |
b2Vec2 | GetAnchorA () const |
Get the anchor point on bodyA in world coordinates. | |
b2Vec2 | GetAnchorB () const |
Get the anchor point on bodyB in world coordinates. | |
b2Vec2 | GetReactionForce (float32 inv_dt) const |
Get the reaction force on body2 at the joint anchor in Newtons. | |
float32 | GetReactionTorque (float32 inv_dt) const |
Get the reaction torque on body2 in N*m. | |
b2Vec2 | GetGroundAnchorA () const |
Get the first ground anchor. | |
b2Vec2 | GetGroundAnchorB () const |
Get the second ground anchor. | |
float32 | GetLength1 () const |
Get the current length of the segment attached to body1. | |
float32 | GetLength2 () const |
Get the current length of the segment attached to body2. | |
float32 | GetRatio () const |
Get the pulley ratio. | |
Protected Member Functions | |
b2PulleyJoint (const b2PulleyJointDef *data) | |
void | InitVelocityConstraints (const b2TimeStep &step) |
void | SolveVelocityConstraints (const b2TimeStep &step) |
bool | SolvePositionConstraints (float32 baumgarte) |
Protected Attributes | |
b2Vec2 | m_groundAnchor1 |
b2Vec2 | m_groundAnchor2 |
b2Vec2 | m_localAnchor1 |
b2Vec2 | m_localAnchor2 |
b2Vec2 | m_u1 |
b2Vec2 | m_u2 |
float32 | m_constant |
float32 | m_ratio |
float32 | m_maxLength1 |
float32 | m_maxLength2 |
float32 | m_pulleyMass |
float32 | m_limitMass1 |
float32 | m_limitMass2 |
float32 | m_impulse |
float32 | m_limitImpulse1 |
float32 | m_limitImpulse2 |
b2LimitState | m_state |
b2LimitState | m_limitState1 |
b2LimitState | m_limitState2 |
Friends | |
class | b2Joint |
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.
b2PulleyJoint::b2PulleyJoint | ( | const b2PulleyJointDef * | data | ) | [protected] |
b2Vec2 b2PulleyJoint::GetAnchorA | ( | ) | const [virtual] |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
b2Vec2 b2PulleyJoint::GetAnchorB | ( | ) | const [virtual] |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
b2Vec2 b2PulleyJoint::GetGroundAnchorA | ( | ) | const |
Get the first ground anchor.
b2Vec2 b2PulleyJoint::GetGroundAnchorB | ( | ) | const |
Get the second ground anchor.
float32 b2PulleyJoint::GetLength1 | ( | ) | const |
Get the current length of the segment attached to body1.
float32 b2PulleyJoint::GetLength2 | ( | ) | const |
Get the current length of the segment attached to body2.
float32 b2PulleyJoint::GetRatio | ( | ) | const |
Get the pulley ratio.
Get the reaction force on body2 at the joint anchor in Newtons.
Implements b2Joint.
Get the reaction torque on body2 in N*m.
Implements b2Joint.
void b2PulleyJoint::InitVelocityConstraints | ( | const b2TimeStep & | step | ) | [protected, virtual] |
Implements b2Joint.
bool b2PulleyJoint::SolvePositionConstraints | ( | float32 | baumgarte | ) | [protected, virtual] |
Implements b2Joint.
void b2PulleyJoint::SolveVelocityConstraints | ( | const b2TimeStep & | step | ) | [protected, virtual] |
Implements b2Joint.
friend class b2Joint [friend] |
float32 b2PulleyJoint::m_constant [protected] |
b2Vec2 b2PulleyJoint::m_groundAnchor1 [protected] |
b2Vec2 b2PulleyJoint::m_groundAnchor2 [protected] |
float32 b2PulleyJoint::m_impulse [protected] |
float32 b2PulleyJoint::m_limitImpulse1 [protected] |
float32 b2PulleyJoint::m_limitImpulse2 [protected] |
float32 b2PulleyJoint::m_limitMass1 [protected] |
float32 b2PulleyJoint::m_limitMass2 [protected] |
b2LimitState b2PulleyJoint::m_limitState1 [protected] |
b2LimitState b2PulleyJoint::m_limitState2 [protected] |
b2Vec2 b2PulleyJoint::m_localAnchor1 [protected] |
b2Vec2 b2PulleyJoint::m_localAnchor2 [protected] |
float32 b2PulleyJoint::m_maxLength1 [protected] |
float32 b2PulleyJoint::m_maxLength2 [protected] |
float32 b2PulleyJoint::m_pulleyMass [protected] |
float32 b2PulleyJoint::m_ratio [protected] |
b2LimitState b2PulleyJoint::m_state [protected] |
b2Vec2 b2PulleyJoint::m_u1 [protected] |
b2Vec2 b2PulleyJoint::m_u2 [protected] |