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

#include <b2MotorJoint.h>

Inheritance diagram for b2MotorJoint:
Inheritance graph
[legend]

Public Member Functions

void Dump ()
 Dump to b2Log. 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 GetAngularOffset () const
 
float32 GetCorrectionFactor () const
 Get the position correction factor in the range [0,1]. More...
 
const b2Vec2GetLinearOffset () const
 
float32 GetMaxForce () const
 Get the maximum friction force in N. More...
 
float32 GetMaxTorque () const
 Get the maximum friction torque in N*m. 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...
 
void SetAngularOffset (float32 angularOffset)
 Set/get the target angular offset, in radians. More...
 
void SetCorrectionFactor (float32 factor)
 Set the position correction factor in the range [0,1]. More...
 
void SetLinearOffset (const b2Vec2 &linearOffset)
 Set/get the target linear offset, in frame A, in meters. More...
 
void SetMaxForce (float32 force)
 Set the maximum friction force in N. More...
 
void SetMaxTorque (float32 torque)
 Set the maximum friction torque in N*m. 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...
 
voidGetUserData () 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

 b2MotorJoint (const b2MotorJointDef *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_angularError
 
float32 m_angularImpulse
 
float32 m_angularMass
 
float32 m_angularOffset
 
float32 m_correctionFactor
 
int32 m_indexA
 
int32 m_indexB
 
float32 m_invIA
 
float32 m_invIB
 
float32 m_invMassA
 
float32 m_invMassB
 
b2Vec2 m_linearError
 
b2Vec2 m_linearImpulse
 
b2Mat22 m_linearMass
 
b2Vec2 m_linearOffset
 
b2Vec2 m_localCenterA
 
b2Vec2 m_localCenterB
 
float32 m_maxForce
 
float32 m_maxTorque
 
b2Vec2 m_rA
 
b2Vec2 m_rB
 
- 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
 
voidm_userData
 

Friends

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 motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground.

Definition at line 59 of file b2MotorJoint.h.

Constructor & Destructor Documentation

b2MotorJoint::b2MotorJoint ( const b2MotorJointDef def)
protected

Definition at line 47 of file b2MotorJoint.cpp.

Member Function Documentation

void b2MotorJoint::Dump ( )
virtual

Dump to b2Log.

Reimplemented from b2Joint.

Definition at line 289 of file b2MotorJoint.cpp.

b2Vec2 b2MotorJoint::GetAnchorA ( ) const
virtual

Get the anchor point on bodyA in world coordinates.

Implements b2Joint.

Definition at line 206 of file b2MotorJoint.cpp.

b2Vec2 b2MotorJoint::GetAnchorB ( ) const
virtual

Get the anchor point on bodyB in world coordinates.

Implements b2Joint.

Definition at line 211 of file b2MotorJoint.cpp.

float32 b2MotorJoint::GetAngularOffset ( ) const

Definition at line 284 of file b2MotorJoint.cpp.

float32 b2MotorJoint::GetCorrectionFactor ( ) const

Get the position correction factor in the range [0,1].

Definition at line 254 of file b2MotorJoint.cpp.

const b2Vec2 & b2MotorJoint::GetLinearOffset ( ) const

Definition at line 269 of file b2MotorJoint.cpp.

float32 b2MotorJoint::GetMaxForce ( ) const

Get the maximum friction force in N.

Definition at line 232 of file b2MotorJoint.cpp.

float32 b2MotorJoint::GetMaxTorque ( ) const

Get the maximum friction torque in N*m.

Definition at line 243 of file b2MotorJoint.cpp.

b2Vec2 b2MotorJoint::GetReactionForce ( float32  inv_dt) const
virtual

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

Implements b2Joint.

Definition at line 216 of file b2MotorJoint.cpp.

float32 b2MotorJoint::GetReactionTorque ( float32  inv_dt) const
virtual

Get the reaction torque on bodyB in N*m.

Implements b2Joint.

Definition at line 221 of file b2MotorJoint.cpp.

void b2MotorJoint::InitVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 61 of file b2MotorJoint.cpp.

void b2MotorJoint::SetAngularOffset ( float32  angularOffset)

Set/get the target angular offset, in radians.

Definition at line 274 of file b2MotorJoint.cpp.

void b2MotorJoint::SetCorrectionFactor ( float32  factor)

Set the position correction factor in the range [0,1].

Definition at line 248 of file b2MotorJoint.cpp.

void b2MotorJoint::SetLinearOffset ( const b2Vec2 linearOffset)

Set/get the target linear offset, in frame A, in meters.

Definition at line 259 of file b2MotorJoint.cpp.

void b2MotorJoint::SetMaxForce ( float32  force)

Set the maximum friction force in N.

Definition at line 226 of file b2MotorJoint.cpp.

void b2MotorJoint::SetMaxTorque ( float32  torque)

Set the maximum friction torque in N*m.

Definition at line 237 of file b2MotorJoint.cpp.

bool b2MotorJoint::SolvePositionConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 199 of file b2MotorJoint.cpp.

void b2MotorJoint::SolveVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 141 of file b2MotorJoint.cpp.

Friends And Related Function Documentation

friend class b2Joint
friend

Definition at line 99 of file b2MotorJoint.h.

Member Data Documentation

float32 b2MotorJoint::m_angularError
protected

Definition at line 124 of file b2MotorJoint.h.

float32 b2MotorJoint::m_angularImpulse
protected

Definition at line 111 of file b2MotorJoint.h.

float32 b2MotorJoint::m_angularMass
protected

Definition at line 130 of file b2MotorJoint.h.

float32 b2MotorJoint::m_angularOffset
protected

Definition at line 109 of file b2MotorJoint.h.

float32 b2MotorJoint::m_correctionFactor
protected

Definition at line 114 of file b2MotorJoint.h.

int32 b2MotorJoint::m_indexA
protected

Definition at line 117 of file b2MotorJoint.h.

int32 b2MotorJoint::m_indexB
protected

Definition at line 118 of file b2MotorJoint.h.

float32 b2MotorJoint::m_invIA
protected

Definition at line 127 of file b2MotorJoint.h.

float32 b2MotorJoint::m_invIB
protected

Definition at line 128 of file b2MotorJoint.h.

float32 b2MotorJoint::m_invMassA
protected

Definition at line 125 of file b2MotorJoint.h.

float32 b2MotorJoint::m_invMassB
protected

Definition at line 126 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_linearError
protected

Definition at line 123 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_linearImpulse
protected

Definition at line 110 of file b2MotorJoint.h.

b2Mat22 b2MotorJoint::m_linearMass
protected

Definition at line 129 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_linearOffset
protected

Definition at line 108 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_localCenterA
protected

Definition at line 121 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_localCenterB
protected

Definition at line 122 of file b2MotorJoint.h.

float32 b2MotorJoint::m_maxForce
protected

Definition at line 112 of file b2MotorJoint.h.

float32 b2MotorJoint::m_maxTorque
protected

Definition at line 113 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_rA
protected

Definition at line 119 of file b2MotorJoint.h.

b2Vec2 b2MotorJoint::m_rB
protected

Definition at line 120 of file b2MotorJoint.h.


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


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52