diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-02 21:41:30 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-02 21:41:30 +0300 |
commit | 4446c3a593c51603e135e38951607b9b668ddec5 (patch) | |
tree | 9552dbd903b4fd05ea740e1bba9b1b87d97414a1 /extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h | |
parent | 6f6f6ee18695dad66ad8aa0eb2bcab72501df597 (diff) |
Sync Bullet to upstream
This syncs Bullet to the latest upstream git version as of writing this.
(commit 47b0259b9700455022b5cf79b651cc1dc71dd59e).
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h index 06a8e3ecd14..95f604a8906 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h @@ -16,32 +16,30 @@ subject to the following restrictions: #ifndef BT_HINGE2_CONSTRAINT_H #define BT_HINGE2_CONSTRAINT_H - - #include "LinearMath/btVector3.h" #include "btTypedConstraint.h" #include "btGeneric6DofSpring2Constraint.h" - - // Constraint similar to ODE Hinge2 Joint // has 3 degrees of frredom: // 2 rotational degrees of freedom, similar to Euler rotations around Z (axis 1) and X (axis 2) // 1 translational (along axis Z) with suspension spring -ATTRIBUTE_ALIGNED16(class) btHinge2Constraint : public btGeneric6DofSpring2Constraint +ATTRIBUTE_ALIGNED16(class) +btHinge2Constraint : public btGeneric6DofSpring2Constraint { protected: - btVector3 m_anchor; - btVector3 m_axis1; - btVector3 m_axis2; + btVector3 m_anchor; + btVector3 m_axis1; + btVector3 m_axis2; + public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - + BT_DECLARE_ALIGNED_ALLOCATOR(); + // constructor // anchor, axis1 and axis2 are in world coordinate system // axis1 must be orthogonal to axis2 - btHinge2Constraint(btRigidBody& rbA, btRigidBody& rbB, btVector3& anchor, btVector3& axis1, btVector3& axis2); + btHinge2Constraint(btRigidBody & rbA, btRigidBody & rbB, btVector3 & anchor, btVector3 & axis1, btVector3 & axis2); // access const btVector3& getAnchor() { return m_calculatedTransformA.getOrigin(); } const btVector3& getAnchor2() { return m_calculatedTransformB.getOrigin(); } @@ -51,10 +49,7 @@ public: btScalar getAngle2() { return getAngle(0); } // limits void setUpperLimit(btScalar ang1max) { setAngularUpperLimit(btVector3(-1.f, 0.f, ang1max)); } - void setLowerLimit(btScalar ang1min) { setAngularLowerLimit(btVector3( 1.f, 0.f, ang1min)); } + void setLowerLimit(btScalar ang1min) { setAngularLowerLimit(btVector3(1.f, 0.f, ang1min)); } }; - - -#endif // BT_HINGE2_CONSTRAINT_H - +#endif // BT_HINGE2_CONSTRAINT_H |