b2PulleyJoint Class Reference

#include <b2PulleyJoint.h>

Inheritance diagram for b2PulleyJoint:
b2Joint

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

b2PulleyJoint::b2PulleyJoint ( const b2PulleyJointDef data  )  [protected]

Member Function Documentation

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.

b2Vec2 b2PulleyJoint::GetReactionForce ( float32  inv_dt  )  const [virtual]

Get the reaction force on body2 at the joint anchor in Newtons.

Implements b2Joint.

float32 b2PulleyJoint::GetReactionTorque ( float32  inv_dt  )  const [virtual]

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.


Friends And Related Function Documentation

friend class b2Joint [friend]

Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Sat Apr 3 18:18:09 2010 for Box2D by  doxygen 1.6.3