 |
Box2D
2.4.0
A 2D physics engine for games
|
23 #ifndef B2_ROPE_JOINT_H
24 #define B2_ROPE_JOINT_H
38 localAnchorA.Set(-1.0f, 0.0f);
39 localAnchorB.Set(1.0f, 0.0f);
80 float GetMaxLength()
const;
83 float GetLength()
const;
93 void InitVelocityConstraints(
const b2SolverData& data)
override;
94 void SolveVelocityConstraints(
const b2SolverData& data)
override;
95 bool SolvePositionConstraints(
const b2SolverData& data)
override;
A 2D column vector.
Definition: b2_math.h:42
b2Vec2 GetReactionForce(float inv_dt) const override
Get the reaction force on bodyB at the joint anchor in Newtons.
Joint definitions are used to construct joints.
Definition: b2_joint.h:73
const b2Vec2 & GetLocalAnchorB() const
The local anchor point relative to bodyB's origin.
Definition: b2_rope_joint.h:76
const b2Vec2 & GetLocalAnchorA() const
The local anchor point relative to bodyA's origin.
Definition: b2_rope_joint.h:73
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition: b2_rope_joint.h:44
b2Vec2 GetAnchorB() const override
Get the anchor point on bodyB in world coordinates.
Definition: b2_rope_joint.h:34
void SetMaxLength(float length)
Set/Get the maximum length of the rope.
Definition: b2_rope_joint.h:79
Solver Data.
Definition: b2_time_step.h:68
Definition: b2_rope_joint.h:64
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition: b2_rope_joint.h:47
float maxLength
Definition: b2_rope_joint.h:52
b2Vec2 GetAnchorA() const override
Get the anchor point on bodyA in world coordinates.
Definition: b2_joint.h:112
float GetReactionTorque(float inv_dt) const override
Get the reaction torque on bodyB in N*m.
void Dump() override
Dump joint to dmLog.