b2PrismaticJoint Class Reference

#include <b2PrismaticJoint.h>

Inheritance diagram for b2PrismaticJoint:
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.
float32 GetJointTranslation () const
 Get the current joint translation, usually in meters.
float32 GetJointSpeed () const
 Get the current joint translation speed, usually in meters per second.
bool IsLimitEnabled () const
 Is the joint limit enabled?
void EnableLimit (bool flag)
 Enable/disable the joint limit.
float32 GetLowerLimit () const
 Get the lower joint limit, usually in meters.
float32 GetUpperLimit () const
 Get the upper joint limit, usually in meters.
void SetLimits (float32 lower, float32 upper)
 Set the joint limits, usually in meters.
bool IsMotorEnabled () const
 Is the joint motor enabled?
void EnableMotor (bool flag)
 Enable/disable the joint motor.
void SetMotorSpeed (float32 speed)
 Set the motor speed, usually in meters per second.
float32 GetMotorSpeed () const
 Get the motor speed, usually in meters per second.
void SetMaxMotorForce (float32 force)
 Set the maximum motor force, usually in N.
float32 GetMotorForce () const
 Get the current motor force, usually in N.

Protected Member Functions

 b2PrismaticJoint (const b2PrismaticJointDef *def)
void InitVelocityConstraints (const b2TimeStep &step)
void SolveVelocityConstraints (const b2TimeStep &step)
bool SolvePositionConstraints (float32 baumgarte)

Protected Attributes

b2Vec2 m_localAnchor1
b2Vec2 m_localAnchor2
b2Vec2 m_localXAxis1
b2Vec2 m_localYAxis1
float32 m_refAngle
b2Vec2 m_axis
b2Vec2 m_perp
float32 m_s1
float32 m_s2
float32 m_a1
float32 m_a2
b2Mat33 m_K
b2Vec3 m_impulse
float32 m_motorMass
float32 m_motorImpulse
float32 m_lowerTranslation
float32 m_upperTranslation
float32 m_maxMotorForce
float32 m_motorSpeed
bool m_enableLimit
bool m_enableMotor
b2LimitState m_limitState

Friends

class b2Joint
class b2GearJoint

Detailed Description

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.


Constructor & Destructor Documentation

b2PrismaticJoint::b2PrismaticJoint ( const b2PrismaticJointDef def  )  [protected]

Member Function Documentation

void b2PrismaticJoint::EnableLimit ( bool  flag  ) 

Enable/disable the joint limit.

void b2PrismaticJoint::EnableMotor ( bool  flag  ) 

Enable/disable the joint motor.

b2Vec2 b2PrismaticJoint::GetAnchorA (  )  const [virtual]

Get the anchor point on bodyA in world coordinates.

Implements b2Joint.

b2Vec2 b2PrismaticJoint::GetAnchorB (  )  const [virtual]

Get the anchor point on bodyB in world coordinates.

Implements b2Joint.

float32 b2PrismaticJoint::GetJointSpeed (  )  const

Get the current joint translation speed, usually in meters per second.

float32 b2PrismaticJoint::GetJointTranslation (  )  const

Get the current joint translation, usually in meters.

float32 b2PrismaticJoint::GetLowerLimit (  )  const

Get the lower joint limit, usually in meters.

float32 b2PrismaticJoint::GetMotorForce (  )  const

Get the current motor force, usually in N.

float32 b2PrismaticJoint::GetMotorSpeed (  )  const [inline]

Get the motor speed, usually in meters per second.

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

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

Implements b2Joint.

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

Get the reaction torque on body2 in N*m.

Implements b2Joint.

float32 b2PrismaticJoint::GetUpperLimit (  )  const

Get the upper joint limit, usually in meters.

void b2PrismaticJoint::InitVelocityConstraints ( const b2TimeStep step  )  [protected, virtual]

Implements b2Joint.

bool b2PrismaticJoint::IsLimitEnabled (  )  const

Is the joint limit enabled?

bool b2PrismaticJoint::IsMotorEnabled (  )  const

Is the joint motor enabled?

void b2PrismaticJoint::SetLimits ( float32  lower,
float32  upper 
)

Set the joint limits, usually in meters.

void b2PrismaticJoint::SetMaxMotorForce ( float32  force  ) 

Set the maximum motor force, usually in N.

void b2PrismaticJoint::SetMotorSpeed ( float32  speed  ) 

Set the motor speed, usually in meters per second.

bool b2PrismaticJoint::SolvePositionConstraints ( float32  baumgarte  )  [protected, virtual]

Implements b2Joint.

void b2PrismaticJoint::SolveVelocityConstraints ( const b2TimeStep step  )  [protected, virtual]

Implements b2Joint.


Friends And Related Function Documentation

friend class b2GearJoint [friend]
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