summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h')
-rw-r--r--thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h b/thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
index 9e70841043..8c24d93a64 100644
--- a/thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
+++ b/thirdparty/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
@@ -16,35 +16,32 @@ subject to the following restrictions:
#ifndef BT_UNIVERSAL_CONSTRAINT_H
#define BT_UNIVERSAL_CONSTRAINT_H
-
-
#include "LinearMath/btVector3.h"
#include "btTypedConstraint.h"
#include "btGeneric6DofConstraint.h"
-
-
/// Constraint similar to ODE Universal Joint
/// has 2 rotatioonal degrees of freedom, similar to Euler rotations around Z (axis 1)
/// and Y (axis 2)
-/// Description from ODE manual :
-/// "Given axis 1 on body 1, and axis 2 on body 2 that is perpendicular to axis 1, it keeps them perpendicular.
+/// Description from ODE manual :
+/// "Given axis 1 on body 1, and axis 2 on body 2 that is perpendicular to axis 1, it keeps them perpendicular.
/// In other words, rotation of the two bodies about the direction perpendicular to the two axes will be equal."
-ATTRIBUTE_ALIGNED16(class) btUniversalConstraint : public btGeneric6DofConstraint
+ATTRIBUTE_ALIGNED16(class)
+btUniversalConstraint : public btGeneric6DofConstraint
{
protected:
- btVector3 m_anchor;
- btVector3 m_axis1;
- btVector3 m_axis2;
+ btVector3 m_anchor;
+ btVector3 m_axis1;
+ btVector3 m_axis2;
+
public:
-
BT_DECLARE_ALIGNED_ALLOCATOR();
-
+
// constructor
// anchor, axis1 and axis2 are in world coordinate system
// axis1 must be orthogonal to axis2
- btUniversalConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& anchor, const btVector3& axis1, const btVector3& axis2);
+ btUniversalConstraint(btRigidBody & rbA, btRigidBody & rbB, const btVector3& anchor, const btVector3& axis1, const btVector3& axis2);
// access
const btVector3& getAnchor() { return m_calculatedTransformA.getOrigin(); }
const btVector3& getAnchor2() { return m_calculatedTransformB.getOrigin(); }
@@ -56,10 +53,7 @@ public:
void setUpperLimit(btScalar ang1max, btScalar ang2max) { setAngularUpperLimit(btVector3(0.f, ang1max, ang2max)); }
void setLowerLimit(btScalar ang1min, btScalar ang2min) { setAngularLowerLimit(btVector3(0.f, ang1min, ang2min)); }
- void setAxis( const btVector3& axis1, const btVector3& axis2);
+ void setAxis(const btVector3& axis1, const btVector3& axis2);
};
-
-
-#endif // BT_UNIVERSAL_CONSTRAINT_H
-
+#endif // BT_UNIVERSAL_CONSTRAINT_H