Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
b2PrismaticJoint Class Reference

#include <b2PrismaticJoint.h>

Inheritance diagram for b2PrismaticJoint:
Inheritance graph
[legend]

Public Member Functions

void Dump ()
 Dump to b2Log. More...
 
void EnableLimit (bool flag)
 Enable/disable the joint limit. More...
 
void EnableMotor (bool flag)
 Enable/disable the joint motor. More...
 
b2Vec2 GetAnchorA () const
 Get the anchor point on bodyA in world coordinates. More...
 
b2Vec2 GetAnchorB () const
 Get the anchor point on bodyB in world coordinates. More...
 
float32 GetJointSpeed () const
 Get the current joint translation speed, usually in meters per second. More...
 
float32 GetJointTranslation () const
 Get the current joint translation, usually in meters. More...
 
const b2Vec2GetLocalAnchorA () const
 The local anchor point relative to bodyA's origin. More...
 
const b2Vec2GetLocalAnchorB () const
 The local anchor point relative to bodyB's origin. More...
 
const b2Vec2GetLocalAxisA () const
 The local joint axis relative to bodyA. More...
 
float32 GetLowerLimit () const
 Get the lower joint limit, usually in meters. More...
 
float32 GetMaxMotorForce () const
 
float32 GetMotorForce (float32 inv_dt) const
 Get the current motor force given the inverse time step, usually in N. More...
 
float32 GetMotorSpeed () const
 Get the motor speed, usually in meters per second. More...
 
b2Vec2 GetReactionForce (float32 inv_dt) const
 Get the reaction force on bodyB at the joint anchor in Newtons. More...
 
float32 GetReactionTorque (float32 inv_dt) const
 Get the reaction torque on bodyB in N*m. More...
 
float32 GetReferenceAngle () const
 Get the reference angle. More...
 
float32 GetUpperLimit () const
 Get the upper joint limit, usually in meters. More...
 
bool IsLimitEnabled () const
 Is the joint limit enabled? More...
 
bool IsMotorEnabled () const
 Is the joint motor enabled? More...
 
void SetLimits (float32 lower, float32 upper)
 Set the joint limits, usually in meters. More...
 
void SetMaxMotorForce (float32 force)
 Set the maximum motor force, usually in N. More...
 
void SetMotorSpeed (float32 speed)
 Set the motor speed, usually in meters per second. More...
 
- Public Member Functions inherited from b2Joint
b2BodyGetBodyA ()
 Get the first body attached to this joint. More...
 
b2BodyGetBodyB ()
 Get the second body attached to this joint. More...
 
bool GetCollideConnected () const
 
b2JointGetNext ()
 Get the next joint the world joint list. More...
 
const b2JointGetNext () const
 
b2JointType GetType () const
 Get the type of the concrete joint. More...
 
void * GetUserData () const
 Get the user data pointer. More...
 
bool IsActive () const
 Short-cut function to determine if either body is inactive. More...
 
void SetUserData (void *data)
 Set the user data pointer. More...
 
virtual void ShiftOrigin (const b2Vec2 &newOrigin)
 Shift the origin for any points stored in world coordinates. More...
 

Protected Member Functions

 b2PrismaticJoint (const b2PrismaticJointDef *def)
 
void InitVelocityConstraints (const b2SolverData &data)
 
bool SolvePositionConstraints (const b2SolverData &data)
 
void SolveVelocityConstraints (const b2SolverData &data)
 
- Protected Member Functions inherited from b2Joint
 b2Joint (const b2JointDef *def)
 
virtual ~b2Joint ()
 

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
 
- Protected Attributes inherited from b2Joint
b2Bodym_bodyA
 
b2Bodym_bodyB
 
bool m_collideConnected
 
b2JointEdge m_edgeA
 
b2JointEdge m_edgeB
 
int32 m_index
 
bool m_islandFlag
 
b2Jointm_next
 
b2Jointm_prev
 
b2JointType m_type
 
void * m_userData
 

Friends

class b2GearJoint
 
class b2Joint
 

Additional Inherited Members

- Static Protected Member Functions inherited from b2Joint
static b2JointCreate (const b2JointDef *def, b2BlockAllocator *allocator)
 
static void Destroy (b2Joint *joint, b2BlockAllocator *allocator)
 

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

b2PrismaticJoint::b2PrismaticJoint ( const b2PrismaticJointDef def)
protected

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.

float32 b2PrismaticJoint::GetJointSpeed ( ) const

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

Definition at line 518 of file b2PrismaticJoint.cpp.

float32 b2PrismaticJoint::GetJointTranslation ( ) const

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.

float32 b2PrismaticJoint::GetLowerLimit ( ) const

Get the lower joint limit, usually in meters.

Definition at line 555 of file b2PrismaticJoint.cpp.

float32 b2PrismaticJoint::GetMaxMotorForce ( ) const
inline

Definition at line 142 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::GetMotorForce ( float32  inv_dt) const

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

Definition at line 604 of file b2PrismaticJoint.cpp.

float32 b2PrismaticJoint::GetMotorSpeed ( ) const
inline

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.

float32 b2PrismaticJoint::GetReactionTorque ( float32  inv_dt) const
virtual

Get the reaction torque on bodyB in N*m.

Implements b2Joint.

Definition at line 502 of file b2PrismaticJoint.cpp.

float32 b2PrismaticJoint::GetReferenceAngle ( ) const
inline

Get the reference angle.

Definition at line 105 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::GetUpperLimit ( ) const

Get the upper joint limit, usually in meters.

Definition at line 560 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::InitVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 126 of file b2PrismaticJoint.cpp.

bool b2PrismaticJoint::IsLimitEnabled ( ) const

Is the joint limit enabled?

Definition at line 539 of file b2PrismaticJoint.cpp.

bool b2PrismaticJoint::IsMotorEnabled ( ) const

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.

void b2PrismaticJoint::SetMaxMotorForce ( float32  force)

Set the maximum motor force, usually in N.

Definition at line 597 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::SetMotorSpeed ( float32  speed)

Set the motor speed, usually in meters per second.

Definition at line 590 of file b2PrismaticJoint.cpp.

bool b2PrismaticJoint::SolvePositionConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 363 of file b2PrismaticJoint.cpp.

void b2PrismaticJoint::SolveVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 266 of file b2PrismaticJoint.cpp.

Friends And Related Function Documentation

friend class b2GearJoint
friend

Definition at line 152 of file b2PrismaticJoint.h.

friend class b2Joint
friend

Definition at line 151 of file b2PrismaticJoint.h.

Member Data Documentation

float32 b2PrismaticJoint::m_a1
protected

Definition at line 186 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_a2
protected

Definition at line 186 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_axis
protected

Definition at line 184 of file b2PrismaticJoint.h.

bool b2PrismaticJoint::m_enableLimit
protected

Definition at line 171 of file b2PrismaticJoint.h.

bool b2PrismaticJoint::m_enableMotor
protected

Definition at line 172 of file b2PrismaticJoint.h.

b2Vec3 b2PrismaticJoint::m_impulse
protected

Definition at line 165 of file b2PrismaticJoint.h.

int32 b2PrismaticJoint::m_indexA
protected

Definition at line 176 of file b2PrismaticJoint.h.

int32 b2PrismaticJoint::m_indexB
protected

Definition at line 177 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_invIA
protected

Definition at line 182 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_invIB
protected

Definition at line 183 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_invMassA
protected

Definition at line 180 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_invMassB
protected

Definition at line 181 of file b2PrismaticJoint.h.

b2Mat33 b2PrismaticJoint::m_K
protected

Definition at line 187 of file b2PrismaticJoint.h.

b2LimitState b2PrismaticJoint::m_limitState
protected

Definition at line 173 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localAnchorA
protected

Definition at line 160 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localAnchorB
protected

Definition at line 161 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localCenterA
protected

Definition at line 178 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localCenterB
protected

Definition at line 179 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localXAxisA
protected

Definition at line 162 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_localYAxisA
protected

Definition at line 163 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_lowerTranslation
protected

Definition at line 167 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_maxMotorForce
protected

Definition at line 169 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_motorImpulse
protected

Definition at line 166 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_motorMass
protected

Definition at line 188 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_motorSpeed
protected

Definition at line 170 of file b2PrismaticJoint.h.

b2Vec2 b2PrismaticJoint::m_perp
protected

Definition at line 184 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_referenceAngle
protected

Definition at line 164 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_s1
protected

Definition at line 185 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_s2
protected

Definition at line 185 of file b2PrismaticJoint.h.

float32 b2PrismaticJoint::m_upperTranslation
protected

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 Jun 6 2019 19:36:41