#include <b2MouseJoint.h>
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 60 of file b2MouseJoint.h.
b2MouseJoint::b2MouseJoint | ( | const b2MouseJointDef * | def | ) | [protected] |
Definition at line 31 of file b2MouseJoint.cpp.
void b2MouseJoint::Dump | ( | ) | [inline, virtual] |
The mouse joint does not support dumping.
Reimplemented from b2Joint.
Definition at line 93 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::GetAnchorA | ( | ) | const [virtual] |
b2Vec2 b2MouseJoint::GetAnchorB | ( | ) | const [virtual] |
float32 b2MouseJoint::GetDampingRatio | ( | ) | const |
Definition at line 91 of file b2MouseJoint.cpp.
float32 b2MouseJoint::GetFrequency | ( | ) | const |
Definition at line 81 of file b2MouseJoint.cpp.
float32 b2MouseJoint::GetMaxForce | ( | ) | const |
Definition at line 71 of file b2MouseJoint.cpp.
b2Vec2 b2MouseJoint::GetReactionForce | ( | float32 | inv_dt | ) | const [virtual] |
float32 b2MouseJoint::GetReactionTorque | ( | float32 | inv_dt | ) | const [virtual] |
const b2Vec2 & b2MouseJoint::GetTarget | ( | ) | const |
Definition at line 61 of file b2MouseJoint.cpp.
void b2MouseJoint::InitVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 96 of file b2MouseJoint.cpp.
void b2MouseJoint::SetDampingRatio | ( | float32 | ratio | ) |
Set/get the damping ratio (dimensionless).
Definition at line 86 of file b2MouseJoint.cpp.
void b2MouseJoint::SetFrequency | ( | float32 | hz | ) |
Set/get the frequency in Hertz.
Definition at line 76 of file b2MouseJoint.cpp.
void b2MouseJoint::SetMaxForce | ( | float32 | force | ) |
Set/get the maximum force in Newtons.
Definition at line 66 of file b2MouseJoint.cpp.
void b2MouseJoint::SetTarget | ( | const b2Vec2 & | target | ) |
Use this to update the target point.
Definition at line 52 of file b2MouseJoint.cpp.
void b2MouseJoint::ShiftOrigin | ( | const b2Vec2 & | newOrigin | ) | [virtual] |
Implement b2Joint::ShiftOrigin.
Reimplemented from b2Joint.
Definition at line 219 of file b2MouseJoint.cpp.
bool b2MouseJoint::SolvePositionConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 193 of file b2MouseJoint.cpp.
void b2MouseJoint::SolveVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 168 of file b2MouseJoint.cpp.
friend class b2Joint [friend] |
Definition at line 99 of file b2MouseJoint.h.
float32 b2MouseJoint::m_beta [protected] |
Definition at line 111 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_C [protected] |
Definition at line 126 of file b2MouseJoint.h.
float32 b2MouseJoint::m_dampingRatio [protected] |
Definition at line 110 of file b2MouseJoint.h.
float32 b2MouseJoint::m_frequencyHz [protected] |
Definition at line 109 of file b2MouseJoint.h.
float32 b2MouseJoint::m_gamma [protected] |
Definition at line 116 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_impulse [protected] |
Definition at line 114 of file b2MouseJoint.h.
int32 b2MouseJoint::m_indexA [protected] |
Definition at line 119 of file b2MouseJoint.h.
int32 b2MouseJoint::m_indexB [protected] |
Definition at line 120 of file b2MouseJoint.h.
float32 b2MouseJoint::m_invIB [protected] |
Definition at line 124 of file b2MouseJoint.h.
float32 b2MouseJoint::m_invMassB [protected] |
Definition at line 123 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_localAnchorB [protected] |
Definition at line 107 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_localCenterB [protected] |
Definition at line 122 of file b2MouseJoint.h.
b2Mat22 b2MouseJoint::m_mass [protected] |
Definition at line 125 of file b2MouseJoint.h.
float32 b2MouseJoint::m_maxForce [protected] |
Definition at line 115 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_rB [protected] |
Definition at line 121 of file b2MouseJoint.h.
b2Vec2 b2MouseJoint::m_targetA [protected] |
Definition at line 108 of file b2MouseJoint.h.