|
Box2D
2.4.1
A 2D physics engine for games
|
23 #ifndef B2_WELD_JOINT_H
24 #define B2_WELD_JOINT_H
37 localAnchorA.Set(0.0f, 0.0f);
38 localAnchorB.Set(0.0f, 0.0f);
39 referenceAngle = 0.0f;
89 float GetStiffness()
const {
return m_stiffness; }
93 float GetDamping()
const {
return m_damping; }
104 void InitVelocityConstraints(
const b2SolverData& data)
override;
105 void SolveVelocityConstraints(
const b2SolverData& data)
override;
106 bool SolvePositionConstraints(
const b2SolverData& data)
override;
115 float m_referenceAngle;
A 2D column vector.
Definition: b2_math.h:41
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:128
float stiffness
Definition: b2_weld_joint.h:61
virtual b2Vec2 GetReactionForce(float inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
virtual b2Vec2 GetAnchorA() const =0
Get the anchor point on bodyA in world coordinates.
float GetReferenceAngle() const
Get the reference angle.
Definition: b2_weld_joint.h:85
float damping
The rotational damping in N*m*s.
Definition: b2_weld_joint.h:64
const b2Vec2 & GetLocalAnchorA() const
The local anchor point relative to bodyA's origin.
Definition: b2_weld_joint.h:79
Joint definitions are used to construct joints.
Definition: b2_joint.h:72
A 2D column vector with 3 elements.
Definition: b2_math.h:132
void SetStiffness(float hz)
Set/get stiffness in N*m.
Definition: b2_weld_joint.h:88
void SetDamping(float damping)
Set/get damping in N*m*s.
Definition: b2_weld_joint.h:92
A 3-by-3 matrix. Stored in column-major order.
Definition: b2_math.h:245
Definition: b2_weld_joint.h:69
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition: b2_weld_joint.h:54
virtual void Dump()
Dump this joint to the log file.
Definition: b2_joint.h:151
float referenceAngle
The bodyB angle minus bodyA angle in the reference state (radians).
Definition: b2_weld_joint.h:57
Definition: b2_weld_joint.h:32
Solver Data.
Definition: b2_time_step.h:67
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition: b2_weld_joint.h:51
virtual b2Vec2 GetAnchorB() const =0
Get the anchor point on bodyB in world coordinates.
Definition: b2_joint.h:110
const b2Vec2 & GetLocalAnchorB() const
The local anchor point relative to bodyB's origin.
Definition: b2_weld_joint.h:82
virtual float GetReactionTorque(float inv_dt) const =0
Get the reaction torque on bodyB in N*m.