Support reference angle on revolute, prismatic, and weld joints (fixes #1194)

This commit is contained in:
airstruck
2016-08-19 14:36:36 +02:00
parent 78a2e80818
commit 154f7cbc7e
12 changed files with 154 additions and 14 deletions
+9
View File
@@ -176,9 +176,12 @@ public:
* @param xB Anchor for body 2 along the x-axis. (World coordinates)
* @param yB Anchor for body 2 along the y-axis. (World coordinates)
* @param collideConnected Whether the connected bodies should collide with each other. Defaults to false.
* @param referenceAngle The reference angle.
**/
RevoluteJoint *newRevoluteJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected);
RevoluteJoint *newRevoluteJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected, float referenceAngle);
/**
* Creates a new PrismaticJoint connecting body1 with body2.
* @param xA World-anchor for body1 along the x-axis.
@@ -188,9 +191,12 @@ public:
* @param ax The x-component of the world-axis.
* @param ay The y-component of the world-axis.
* @param collideConnected Whether the connected bodies should collide with each other. Defaults to false.
* @param referenceAngle The reference angle.
**/
PrismaticJoint *newPrismaticJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, float ax, float ay, bool collideConnected);
PrismaticJoint *newPrismaticJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, float ax, float ay, bool collideConnected, float referenceAngle);
/**
* Creates a new PulleyJoint connecting body1 with body2.
* @param groundAnchor1 World ground-anchor for body1.
@@ -228,9 +234,12 @@ public:
* @param xB Anchor for body 2 along the x-axis. (World coordinates)
* @param yB Anchor for body 2 along the y-axis. (World coordinates)
* @param collideConnected Whether the connected bodies should collide with each other. Defaults to false.
* @param referenceAngle The reference angle.
**/
WeldJoint *newWeldJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected);
WeldJoint *newWeldJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected, float referenceAngle);
/**
* Creates a new WheelJoint connecting body1 with body2.
* @param xA Anchor for body 1 along the x-axis. (World coordinates)