#include <b2_friction_joint.h>
Public Member Functions | |
void | Dump () override |
Dump joint to dmLog. More... | |
b2Vec2 | GetAnchorA () const override |
Get the anchor point on bodyA in world coordinates. More... | |
b2Vec2 | GetAnchorB () const override |
Get the anchor point on bodyB in world coordinates. More... | |
const b2Vec2 & | GetLocalAnchorA () const |
The local anchor point relative to bodyA's origin. More... | |
const b2Vec2 & | GetLocalAnchorB () const |
The local anchor point relative to bodyB's origin. More... | |
float | GetMaxForce () const |
Get the maximum friction force in N. More... | |
float | GetMaxTorque () const |
Get the maximum friction torque in N*m. More... | |
b2Vec2 | GetReactionForce (float inv_dt) const override |
Get the reaction force on bodyB at the joint anchor in Newtons. More... | |
float | GetReactionTorque (float inv_dt) const override |
Get the reaction torque on bodyB in N*m. More... | |
void | SetMaxForce (float force) |
Set the maximum friction force in N. More... | |
void | SetMaxTorque (float torque) |
Set the maximum friction torque in N*m. More... | |
![]() | |
virtual void | Draw (b2Draw *draw) const |
Debug draw this joint. More... | |
b2Body * | GetBodyA () |
Get the first body attached to this joint. More... | |
b2Body * | GetBodyB () |
Get the second body attached to this joint. More... | |
bool | GetCollideConnected () const |
b2Joint * | GetNext () |
Get the next joint the world joint list. More... | |
const b2Joint * | GetNext () const |
b2JointType | GetType () const |
Get the type of the concrete joint. More... | |
b2JointUserData & | GetUserData () |
Get the user data pointer. More... | |
bool | IsEnabled () const |
Short-cut function to determine if either body is enabled. More... | |
virtual void | ShiftOrigin (const b2Vec2 &newOrigin) |
Shift the origin for any points stored in world coordinates. More... | |
Protected Member Functions | |
b2FrictionJoint (const b2FrictionJointDef *def) | |
void | InitVelocityConstraints (const b2SolverData &data) override |
bool | SolvePositionConstraints (const b2SolverData &data) override |
void | SolveVelocityConstraints (const b2SolverData &data) override |
![]() | |
b2Joint (const b2JointDef *def) | |
virtual | ~b2Joint () |
Protected Attributes | |
float | m_angularImpulse |
float | m_angularMass |
int32 | m_indexA |
int32 | m_indexB |
float | m_invIA |
float | m_invIB |
float | m_invMassA |
float | m_invMassB |
b2Vec2 | m_linearImpulse |
b2Mat22 | m_linearMass |
b2Vec2 | m_localAnchorA |
b2Vec2 | m_localAnchorB |
b2Vec2 | m_localCenterA |
b2Vec2 | m_localCenterB |
float | m_maxForce |
float | m_maxTorque |
b2Vec2 | m_rA |
b2Vec2 | m_rB |
![]() | |
b2Body * | m_bodyA |
b2Body * | m_bodyB |
bool | m_collideConnected |
b2JointEdge | m_edgeA |
b2JointEdge | m_edgeB |
int32 | m_index |
bool | m_islandFlag |
b2Joint * | m_next |
b2Joint * | m_prev |
b2JointType | m_type |
b2JointUserData | m_userData |
Friends | |
class | b2Joint |
Additional Inherited Members | |
![]() | |
static b2Joint * | Create (const b2JointDef *def, b2BlockAllocator *allocator) |
static void | Destroy (b2Joint *joint, b2BlockAllocator *allocator) |
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Definition at line 60 of file b2_friction_joint.h.
|
protected |
Definition at line 47 of file b2_friction_joint.cpp.
|
overridevirtual |
Dump joint to dmLog.
Reimplemented from b2Joint.
Definition at line 241 of file b2_friction_joint.cpp.
|
overridevirtual |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
Definition at line 199 of file b2_friction_joint.cpp.
|
overridevirtual |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
Definition at line 204 of file b2_friction_joint.cpp.
|
inline |
The local anchor point relative to bodyA's origin.
Definition at line 70 of file b2_friction_joint.h.
|
inline |
The local anchor point relative to bodyB's origin.
Definition at line 73 of file b2_friction_joint.h.
float b2FrictionJoint::GetMaxForce | ( | ) | const |
Get the maximum friction force in N.
Definition at line 225 of file b2_friction_joint.cpp.
float b2FrictionJoint::GetMaxTorque | ( | ) | const |
Get the maximum friction torque in N*m.
Definition at line 236 of file b2_friction_joint.cpp.
|
overridevirtual |
Get the reaction force on bodyB at the joint anchor in Newtons.
Implements b2Joint.
Definition at line 209 of file b2_friction_joint.cpp.
|
overridevirtual |
Get the reaction torque on bodyB in N*m.
Implements b2Joint.
Definition at line 214 of file b2_friction_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 60 of file b2_friction_joint.cpp.
void b2FrictionJoint::SetMaxForce | ( | float | force | ) |
Set the maximum friction force in N.
Definition at line 219 of file b2_friction_joint.cpp.
void b2FrictionJoint::SetMaxTorque | ( | float | torque | ) |
Set the maximum friction torque in N*m.
Definition at line 230 of file b2_friction_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 192 of file b2_friction_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 135 of file b2_friction_joint.cpp.
|
friend |
Definition at line 92 of file b2_friction_joint.h.
|
protected |
Definition at line 105 of file b2_friction_joint.h.
|
protected |
Definition at line 121 of file b2_friction_joint.h.
|
protected |
Definition at line 110 of file b2_friction_joint.h.
|
protected |
Definition at line 111 of file b2_friction_joint.h.
|
protected |
Definition at line 118 of file b2_friction_joint.h.
|
protected |
Definition at line 119 of file b2_friction_joint.h.
|
protected |
Definition at line 116 of file b2_friction_joint.h.
|
protected |
Definition at line 117 of file b2_friction_joint.h.
|
protected |
Definition at line 104 of file b2_friction_joint.h.
|
protected |
Definition at line 120 of file b2_friction_joint.h.
|
protected |
Definition at line 100 of file b2_friction_joint.h.
|
protected |
Definition at line 101 of file b2_friction_joint.h.
|
protected |
Definition at line 114 of file b2_friction_joint.h.
|
protected |
Definition at line 115 of file b2_friction_joint.h.
|
protected |
Definition at line 106 of file b2_friction_joint.h.
|
protected |
Definition at line 107 of file b2_friction_joint.h.
|
protected |
Definition at line 112 of file b2_friction_joint.h.
|
protected |
Definition at line 113 of file b2_friction_joint.h.