mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Support reference angle on revolute, prismatic, and weld joints (fixes #1194)
This commit is contained in:
@@ -43,6 +43,8 @@ public:
|
||||
**/
|
||||
WeldJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected);
|
||||
|
||||
WeldJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected, float referenceAngle);
|
||||
|
||||
virtual ~WeldJoint();
|
||||
|
||||
/**
|
||||
@@ -67,10 +69,17 @@ public:
|
||||
**/
|
||||
float getDampingRatio() const;
|
||||
|
||||
/**
|
||||
* Gets the reference angle.
|
||||
**/
|
||||
float getReferenceAngle() const;
|
||||
|
||||
private:
|
||||
|
||||
// The Box2D weld joint object.
|
||||
b2WeldJoint *joint;
|
||||
|
||||
void init(b2WeldJointDef &def, Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected);
|
||||
};
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user