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

#include <b2MotorJoint.h>

Inheritance diagram for b2MotorJoint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

 b2MotorJoint (const b2MotorJointDef *def)
void InitVelocityConstraints (const b2SolverData &data)
bool SolvePositionConstraints (const b2SolverData &data)
void SolveVelocityConstraints (const b2SolverData &data)

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

Friends

class b2Joint

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.

Definition at line 284 of file b2MotorJoint.cpp.

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

Definition at line 254 of file b2MotorJoint.cpp.

Definition at line 269 of file b2MotorJoint.cpp.

Get the maximum friction force in N.

Definition at line 232 of file b2MotorJoint.cpp.

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) [protected, virtual]

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.

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.

Set the maximum friction force in N.

Definition at line 226 of file b2MotorJoint.cpp.

Set the maximum friction torque in N*m.

Definition at line 237 of file b2MotorJoint.cpp.

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

Implements b2Joint.

Definition at line 199 of file b2MotorJoint.cpp.

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

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

Definition at line 124 of file b2MotorJoint.h.

Definition at line 111 of file b2MotorJoint.h.

Definition at line 130 of file b2MotorJoint.h.

Definition at line 109 of file b2MotorJoint.h.

Definition at line 114 of file b2MotorJoint.h.

Definition at line 117 of file b2MotorJoint.h.

Definition at line 118 of file b2MotorJoint.h.

Definition at line 127 of file b2MotorJoint.h.

Definition at line 128 of file b2MotorJoint.h.

Definition at line 125 of file b2MotorJoint.h.

Definition at line 126 of file b2MotorJoint.h.

Definition at line 123 of file b2MotorJoint.h.

Definition at line 110 of file b2MotorJoint.h.

Definition at line 129 of file b2MotorJoint.h.

Definition at line 108 of file b2MotorJoint.h.

Definition at line 121 of file b2MotorJoint.h.

Definition at line 122 of file b2MotorJoint.h.

Definition at line 112 of file b2MotorJoint.h.

Definition at line 113 of file b2MotorJoint.h.

Definition at line 119 of file b2MotorJoint.h.

Definition at line 120 of file b2MotorJoint.h.


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


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 22:08:35