#include <b2_mouse_joint.h>
Public Member Functions | |
void | Dump () override |
The mouse joint does not support dumping. More... | |
b2Vec2 | GetAnchorA () const override |
Implements b2Joint. More... | |
b2Vec2 | GetAnchorB () const override |
Implements b2Joint. More... | |
float | GetDamping () const |
float | GetMaxForce () const |
b2Vec2 | GetReactionForce (float inv_dt) const override |
Implements b2Joint. More... | |
float | GetReactionTorque (float inv_dt) const override |
Implements b2Joint. More... | |
float | GetStiffness () const |
const b2Vec2 & | GetTarget () const |
void | SetDamping (float damping) |
Set/get linear damping in N*s/m. More... | |
void | SetMaxForce (float force) |
Set/get the maximum force in Newtons. More... | |
void | SetStiffness (float stiffness) |
Set/get the linear stiffness in N/m. More... | |
void | SetTarget (const b2Vec2 &target) |
Use this to update the target point. More... | |
void | ShiftOrigin (const b2Vec2 &newOrigin) override |
Implement b2Joint::ShiftOrigin. 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... | |
Protected Member Functions | |
b2MouseJoint (const b2MouseJointDef *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_beta |
b2Vec2 | m_C |
float | m_damping |
float | m_gamma |
b2Vec2 | m_impulse |
int32 | m_indexA |
int32 | m_indexB |
float | m_invIB |
float | m_invMassB |
b2Vec2 | m_localAnchorB |
b2Vec2 | m_localCenterB |
b2Mat22 | m_mass |
float | m_maxForce |
b2Vec2 | m_rB |
float | m_stiffness |
b2Vec2 | m_targetA |
![]() | |
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) |
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.
Definition at line 65 of file b2_mouse_joint.h.
|
protected |
Definition at line 35 of file b2_mouse_joint.cpp.
|
inlineoverridevirtual |
The mouse joint does not support dumping.
Reimplemented from b2Joint.
Definition at line 98 of file b2_mouse_joint.h.
|
overridevirtual |
|
overridevirtual |
|
inline |
Definition at line 95 of file b2_mouse_joint.h.
float b2MouseJoint::GetMaxForce | ( | ) | const |
Definition at line 68 of file b2_mouse_joint.cpp.
|
overridevirtual |
|
overridevirtual |
|
inline |
Definition at line 91 of file b2_mouse_joint.h.
const b2Vec2 & b2MouseJoint::GetTarget | ( | ) | const |
Definition at line 58 of file b2_mouse_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 73 of file b2_mouse_joint.cpp.
|
inline |
Set/get linear damping in N*s/m.
Definition at line 94 of file b2_mouse_joint.h.
void b2MouseJoint::SetMaxForce | ( | float | force | ) |
Set/get the maximum force in Newtons.
Definition at line 63 of file b2_mouse_joint.cpp.
|
inline |
Set/get the linear stiffness in N/m.
Definition at line 90 of file b2_mouse_joint.h.
Use this to update the target point.
Definition at line 49 of file b2_mouse_joint.cpp.
Implement b2Joint::ShiftOrigin.
Reimplemented from b2Joint.
Definition at line 189 of file b2_mouse_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 163 of file b2_mouse_joint.cpp.
|
overrideprotectedvirtual |
Implements b2Joint.
Definition at line 138 of file b2_mouse_joint.cpp.
|
friend |
Definition at line 104 of file b2_mouse_joint.h.
|
protected |
Definition at line 116 of file b2_mouse_joint.h.
|
protected |
Definition at line 131 of file b2_mouse_joint.h.
|
protected |
Definition at line 115 of file b2_mouse_joint.h.
|
protected |
Definition at line 121 of file b2_mouse_joint.h.
|
protected |
Definition at line 119 of file b2_mouse_joint.h.
|
protected |
Definition at line 124 of file b2_mouse_joint.h.
|
protected |
Definition at line 125 of file b2_mouse_joint.h.
|
protected |
Definition at line 129 of file b2_mouse_joint.h.
|
protected |
Definition at line 128 of file b2_mouse_joint.h.
|
protected |
Definition at line 112 of file b2_mouse_joint.h.
|
protected |
Definition at line 127 of file b2_mouse_joint.h.
|
protected |
Definition at line 130 of file b2_mouse_joint.h.
|
protected |
Definition at line 120 of file b2_mouse_joint.h.
|
protected |
Definition at line 126 of file b2_mouse_joint.h.
|
protected |
Definition at line 114 of file b2_mouse_joint.h.
|
protected |
Definition at line 113 of file b2_mouse_joint.h.