23 #ifndef B2_MOUSE_JOINT_H 24 #define B2_MOUSE_JOINT_H 36 target.Set(0.0
f, 0.0
f);
82 void SetTarget(
const b2Vec2& target);
83 const b2Vec2& GetTarget()
const;
86 void SetMaxForce(
float force);
87 float GetMaxForce()
const;
98 void Dump()
override {
b2Log(
"Mouse joint dumping is not supported.\n"); }
virtual void SolveVelocityConstraints(const b2SolverData &data)=0
float damping
The linear damping in N*s/m.
virtual b2Vec2 GetReactionForce(float inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
Joint definitions are used to construct joints.
void b2Log(const char *string,...)
Implement this to use your own logging.
void SetStiffness(float stiffness)
Set/get the linear stiffness in N/m.
float stiffness
The linear stiffness in N/m.
void Dump() override
The mouse joint does not support dumping.
virtual float GetReactionTorque(float inv_dt) const =0
Get the reaction torque on bodyB in N*m.
virtual b2Vec2 GetAnchorA() const =0
Get the anchor point on bodyA in world coordinates.
virtual void InitVelocityConstraints(const b2SolverData &data)=0
void SetDamping(float damping)
Set/get linear damping in N*s/m.
virtual bool SolvePositionConstraints(const b2SolverData &data)=0
virtual b2Vec2 GetAnchorB() const =0
Get the anchor point on bodyB in world coordinates.
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
float GetStiffness() const
A 2-by-2 matrix. Stored in column-major order.