diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-01-17 23:35:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-01-26 00:14:46 +0300 |
commit | b64d5809e7e3b832e2a011869db68e70b4b4e6fc (patch) | |
tree | aa4f6714da9f546eeee7dffed9236f9c8309524b /extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h | |
parent | 3c72e302e1eb25de43dd9d077f0c730cc02b5674 (diff) |
Upgrade Bullet to version 2.83.
I tried to carefully preserve all patches since the last upgrade.
Improves T47195, cloth collision detection bug.
Differential Revision: https://developer.blender.org/D1739
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h index 431a524169e..bea8629c325 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h @@ -111,14 +111,14 @@ public: //! Is limited - bool isLimited() + bool isLimited() const { if(m_loLimit > m_hiLimit) return false; return true; } //! Need apply correction - bool needApplyTorques() + bool needApplyTorques() const { if(m_currentLimit == 0 && m_enableMotor == false) return false; return true; @@ -207,11 +207,11 @@ public: - limited means upper > lower - limitIndex: first 3 are linear, next 3 are angular */ - inline bool isLimited(int limitIndex) + inline bool isLimited(int limitIndex) const { return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); } - inline bool needApplyForce(int limitIndex) + inline bool needApplyForce(int limitIndex) const { if(m_currentLimit[limitIndex] == 0 && m_enableMotor[limitIndex] == false) return false; return true; @@ -457,7 +457,7 @@ public: m_linearLimits.m_lowerLimit = linearLower; } - void getLinearLowerLimit(btVector3& linearLower) + void getLinearLowerLimit(btVector3& linearLower) const { linearLower = m_linearLimits.m_lowerLimit; } @@ -467,7 +467,7 @@ public: m_linearLimits.m_upperLimit = linearUpper; } - void getLinearUpperLimit(btVector3& linearUpper) + void getLinearUpperLimit(btVector3& linearUpper) const { linearUpper = m_linearLimits.m_upperLimit; } @@ -478,7 +478,7 @@ public: m_angularLimits[i].m_loLimit = btNormalizeAngle(angularLower[i]); } - void getAngularLowerLimit(btVector3& angularLower) + void getAngularLowerLimit(btVector3& angularLower) const { for(int i = 0; i < 3; i++) angularLower[i] = m_angularLimits[i].m_loLimit; @@ -490,7 +490,7 @@ public: m_angularLimits[i].m_hiLimit = btNormalizeAngle(angularUpper[i]); } - void getAngularUpperLimit(btVector3& angularUpper) + void getAngularUpperLimit(btVector3& angularUpper) const { for(int i = 0; i < 3; i++) angularUpper[i] = m_angularLimits[i].m_hiLimit; @@ -532,7 +532,7 @@ public: - limited means upper > lower - limitIndex: first 3 are linear, next 3 are angular */ - bool isLimited(int limitIndex) + bool isLimited(int limitIndex) const { if(limitIndex<3) { @@ -549,8 +549,11 @@ public: btConstraintInfo2 *info, int row, btVector3& ax1, int rotational, int rotAllowed = false); // access for UseFrameOffset - bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; } + bool getUseFrameOffset() const { return m_useOffsetForConstraintFrame; } void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; } + + bool getUseLinearReferenceFrameA() const { return m_useLinearReferenceFrameA; } + void setUseLinearReferenceFrameA(bool linearReferenceFrameA) { m_useLinearReferenceFrameA = linearReferenceFrameA; } ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). ///If no axis is provided, it uses the default axis for this constraint. @@ -560,6 +563,10 @@ public: void setAxis( const btVector3& axis1, const btVector3& axis2); + virtual int getFlags() const + { + return m_flags; + } virtual int calculateSerializeBufferSize() const; |