#include <b2MouseJoint.h>
Public Member Functions | |
void | Dump () |
The mouse joint does not support dumping. More... | |
b2Vec2 | GetAnchorA () const |
Implements b2Joint. More... | |
b2Vec2 | GetAnchorB () const |
Implements b2Joint. More... | |
float32 | GetDampingRatio () const |
float32 | GetFrequency () const |
float32 | GetMaxForce () const |
b2Vec2 | GetReactionForce (float32 inv_dt) const |
Implements b2Joint. More... | |
float32 | GetReactionTorque (float32 inv_dt) const |
Implements b2Joint. More... | |
const b2Vec2 & | GetTarget () const |
void | SetDampingRatio (float32 ratio) |
Set/get the damping ratio (dimensionless). More... | |
void | SetFrequency (float32 hz) |
Set/get the frequency in Hertz. More... | |
void | SetMaxForce (float32 force) |
Set/get the maximum force in Newtons. More... | |
void | SetTarget (const b2Vec2 &target) |
Use this to update the target point. More... | |
void | ShiftOrigin (const b2Vec2 &newOrigin) |
Implement b2Joint::ShiftOrigin. More... | |
Public Member Functions inherited from b2Joint | |
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... | |
void * | GetUserData () 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... | |
Protected Member Functions | |
b2MouseJoint (const b2MouseJointDef *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_beta |
b2Vec2 | m_C |
float32 | m_dampingRatio |
float32 | m_frequencyHz |
float32 | m_gamma |
b2Vec2 | m_impulse |
int32 | m_indexA |
int32 | m_indexB |
float32 | m_invIB |
float32 | m_invMassB |
b2Vec2 | m_localAnchorB |
b2Vec2 | m_localCenterB |
b2Mat22 | m_mass |
float32 | m_maxForce |
b2Vec2 | m_rB |
b2Vec2 | m_targetA |
Protected Attributes inherited from b2Joint | |
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 |
void * | m_userData |
Friends | |
class | b2Joint |
Additional Inherited Members | |
Static Protected Member Functions inherited from b2Joint | |
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 60 of file b2MouseJoint.h.
|
protected |
Definition at line 31 of file b2MouseJoint.cpp.
|
inlinevirtual |
The mouse joint does not support dumping.
Reimplemented from b2Joint.
Definition at line 93 of file b2MouseJoint.h.
|
virtual |
|
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.
const b2Vec2 & b2MouseJoint::GetTarget | ( | ) | const |
Definition at line 61 of file b2MouseJoint.cpp.
|
protectedvirtual |
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.
|
virtual |
Implement b2Joint::ShiftOrigin.
Reimplemented from b2Joint.
Definition at line 219 of file b2MouseJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 193 of file b2MouseJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 168 of file b2MouseJoint.cpp.
|
friend |
Definition at line 99 of file b2MouseJoint.h.
|
protected |
Definition at line 111 of file b2MouseJoint.h.
|
protected |
Definition at line 126 of file b2MouseJoint.h.
|
protected |
Definition at line 110 of file b2MouseJoint.h.
|
protected |
Definition at line 109 of file b2MouseJoint.h.
|
protected |
Definition at line 116 of file b2MouseJoint.h.
|
protected |
Definition at line 114 of file b2MouseJoint.h.
|
protected |
Definition at line 119 of file b2MouseJoint.h.
|
protected |
Definition at line 120 of file b2MouseJoint.h.
|
protected |
Definition at line 124 of file b2MouseJoint.h.
|
protected |
Definition at line 123 of file b2MouseJoint.h.
|
protected |
Definition at line 107 of file b2MouseJoint.h.
|
protected |
Definition at line 122 of file b2MouseJoint.h.
|
protected |
Definition at line 125 of file b2MouseJoint.h.
|
protected |
Definition at line 115 of file b2MouseJoint.h.
|
protected |
Definition at line 121 of file b2MouseJoint.h.
|
protected |
Definition at line 108 of file b2MouseJoint.h.