Public Member Functions | Protected Member Functions | Protected Attributes | Friends
b2PrismaticJoint Class Reference

#include <b2PrismaticJoint.h>

Inheritance diagram for b2PrismaticJoint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void Dump ()
 Dump to b2Log.
void EnableLimit (bool flag)
 Enable/disable the joint limit.
void EnableMotor (bool flag)
 Enable/disable the joint motor.
b2Vec2 GetAnchorA () const
 Get the anchor point on bodyA in world coordinates.
b2Vec2 GetAnchorB () const
 Get the anchor point on bodyB in world coordinates.
float32 GetJointSpeed () const
 Get the current joint translation speed, usually in meters per second.
float32 GetJointTranslation () const
 Get the current joint translation, usually in meters.
const b2Vec2GetLocalAnchorA () const
 The local anchor point relative to bodyA's origin.
const b2Vec2GetLocalAnchorB () const
 The local anchor point relative to bodyB's origin.
const b2Vec2GetLocalAxisA () const
 The local joint axis relative to bodyA.
float32 GetLowerLimit () const
 Get the lower joint limit, usually in meters.
float32 GetMaxMotorForce () const
float32 GetMotorForce (float32 inv_dt) const
 Get the current motor force given the inverse time step, usually in N.
float32 GetMotorSpeed () const
 Get the motor speed, usually in meters per second.
b2Vec2 GetReactionForce (float32 inv_dt) const
 Get the reaction force on bodyB at the joint anchor in Newtons.
float32 GetReactionTorque (float32 inv_dt) const
 Get the reaction torque on bodyB in N*m.
float32 GetReferenceAngle () const
 Get the reference angle.
float32 GetUpperLimit () const
 Get the upper joint limit, usually in meters.
bool IsLimitEnabled () const
 Is the joint limit enabled?
bool IsMotorEnabled () const
 Is the joint motor enabled?
void SetLimits (float32 lower, float32 upper)
 Set the joint limits, usually in meters.
void SetMaxMotorForce (float32 force)
 Set the maximum motor force, usually in N.
void SetMotorSpeed (float32 speed)
 Set the motor speed, usually in meters per second.

Protected Member Functions

 b2PrismaticJoint (const b2PrismaticJointDef *def)
void InitVelocityConstraints (const b2SolverData &data)
bool SolvePositionConstraints (const b2SolverData &data)
void SolveVelocityConstraints (const b2SolverData &data)

Protected Attributes

float32 m_a1
float32 m_a2
b2Vec2 m_axis
bool m_enableLimit
bool m_enableMotor
b2Vec3 m_impulse
int32 m_indexA
int32 m_indexB
float32 m_invIA
float32 m_invIB
float32 m_invMassA
float32 m_invMassB
b2Mat33 m_K
b2LimitState m_limitState
b2Vec2 m_localAnchorA
b2Vec2 m_localAnchorB
b2Vec2 m_localCenterA
b2Vec2 m_localCenterB
b2Vec2 m_localXAxisA
b2Vec2 m_localYAxisA
float32 m_lowerTranslation
float32 m_maxMotorForce
float32 m_motorImpulse
float32 m_motorMass
float32 m_motorSpeed
b2Vec2 m_perp
float32 m_referenceAngle
float32 m_s1
float32 m_s2
float32 m_upperTranslation

Friends

class b2GearJoint
class b2Joint

Detailed Description

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. 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.

Definition at line 86 of file b2PrismaticJoint.h.


Constructor & Destructor Documentation

Definition at line 100 of file b2PrismaticJoint.cpp.


Member Function Documentation

void b2PrismaticJoint::Dump ( ) [virtual]

Dump to b2Log.

Reimplemented from b2Joint.

Definition at line 609 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::EnableLimit ( bool  flag)

Enable/disable the joint limit.

Definition at line 544 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::EnableMotor ( bool  flag)

Enable/disable the joint motor.

Definition at line 583 of file b2PrismaticJoint.cpp.

b2Vec2 b2PrismaticJoint::GetAnchorA ( ) const [virtual]

Get the anchor point on bodyA in world coordinates.

Implements b2Joint.

Definition at line 487 of file b2PrismaticJoint.cpp.

b2Vec2 b2PrismaticJoint::GetAnchorB ( ) const [virtual]

Get the anchor point on bodyB in world coordinates.

Implements b2Joint.

Definition at line 492 of file b2PrismaticJoint.cpp.

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

Definition at line 518 of file b2PrismaticJoint.cpp.

Get the current joint translation, usually in meters.

Definition at line 507 of file b2PrismaticJoint.cpp.

const b2Vec2& b2PrismaticJoint::GetLocalAnchorA ( ) const [inline]

The local anchor point relative to bodyA's origin.

Definition at line 96 of file b2PrismaticJoint.h.

const b2Vec2& b2PrismaticJoint::GetLocalAnchorB ( ) const [inline]

The local anchor point relative to bodyB's origin.

Definition at line 99 of file b2PrismaticJoint.h.

const b2Vec2& b2PrismaticJoint::GetLocalAxisA ( ) const [inline]

The local joint axis relative to bodyA.

Definition at line 102 of file b2PrismaticJoint.h.

Get the lower joint limit, usually in meters.

Definition at line 555 of file b2PrismaticJoint.cpp.

Definition at line 142 of file b2PrismaticJoint.h.

Get the current motor force given the inverse time step, usually in N.

Definition at line 604 of file b2PrismaticJoint.cpp.

Get the motor speed, usually in meters per second.

Definition at line 191 of file b2PrismaticJoint.h.

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

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

Implements b2Joint.

Definition at line 497 of file b2PrismaticJoint.cpp.

Get the reaction torque on bodyB in N*m.

Implements b2Joint.

Definition at line 502 of file b2PrismaticJoint.cpp.

Get the reference angle.

Definition at line 105 of file b2PrismaticJoint.h.

Get the upper joint limit, usually in meters.

Definition at line 560 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::InitVelocityConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 126 of file b2PrismaticJoint.cpp.

Is the joint limit enabled?

Definition at line 539 of file b2PrismaticJoint.cpp.

Is the joint motor enabled?

Definition at line 578 of file b2PrismaticJoint.cpp.

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

Set the joint limits, usually in meters.

Definition at line 565 of file b2PrismaticJoint.cpp.

Set the maximum motor force, usually in N.

Definition at line 597 of file b2PrismaticJoint.cpp.

Set the motor speed, usually in meters per second.

Definition at line 590 of file b2PrismaticJoint.cpp.

bool b2PrismaticJoint::SolvePositionConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 363 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::SolveVelocityConstraints ( const b2SolverData data) [protected, virtual]

Implements b2Joint.

Definition at line 266 of file b2PrismaticJoint.cpp.


Friends And Related Function Documentation

friend class b2GearJoint [friend]

Reimplemented from b2Joint.

Definition at line 152 of file b2PrismaticJoint.h.

friend class b2Joint [friend]

Definition at line 151 of file b2PrismaticJoint.h.


Member Data Documentation

Definition at line 186 of file b2PrismaticJoint.h.

Definition at line 186 of file b2PrismaticJoint.h.

Definition at line 184 of file b2PrismaticJoint.h.

Definition at line 171 of file b2PrismaticJoint.h.

Definition at line 172 of file b2PrismaticJoint.h.

Definition at line 165 of file b2PrismaticJoint.h.

Definition at line 176 of file b2PrismaticJoint.h.

Definition at line 177 of file b2PrismaticJoint.h.

Definition at line 182 of file b2PrismaticJoint.h.

Definition at line 183 of file b2PrismaticJoint.h.

Definition at line 180 of file b2PrismaticJoint.h.

Definition at line 181 of file b2PrismaticJoint.h.

Definition at line 187 of file b2PrismaticJoint.h.

Definition at line 173 of file b2PrismaticJoint.h.

Definition at line 160 of file b2PrismaticJoint.h.

Definition at line 161 of file b2PrismaticJoint.h.

Definition at line 178 of file b2PrismaticJoint.h.

Definition at line 179 of file b2PrismaticJoint.h.

Definition at line 162 of file b2PrismaticJoint.h.

Definition at line 163 of file b2PrismaticJoint.h.

Definition at line 167 of file b2PrismaticJoint.h.

Definition at line 169 of file b2PrismaticJoint.h.

Definition at line 166 of file b2PrismaticJoint.h.

Definition at line 188 of file b2PrismaticJoint.h.

Definition at line 170 of file b2PrismaticJoint.h.

Definition at line 184 of file b2PrismaticJoint.h.

Definition at line 164 of file b2PrismaticJoint.h.

Definition at line 185 of file b2PrismaticJoint.h.

Definition at line 185 of file b2PrismaticJoint.h.

Definition at line 168 of file b2PrismaticJoint.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Thu Sep 7 2017 09:27:49