diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-25 07:43:20 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-10-25 07:43:20 +0400 |
commit | 472a021aca3c0a6278151f7abee4e0970b026e3f (patch) | |
tree | 3456ce084e33450cc21c68beca1bd407801bf256 /extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h | |
parent | 4514eeaa8e335a86de0bda68aa4814c0bafad7eb (diff) |
bullet: Update to version 2.82 (bullet revision 2705)
Remove patch that has been applied upstream.
Fixes several bugs.
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h index 441fa375050..b58f984d0fb 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -21,6 +21,15 @@ subject to the following restrictions: #include "btSolverConstraint.h" #include "BulletDynamics/Dynamics/btRigidBody.h" +#ifdef BT_USE_DOUBLE_PRECISION +#define btTypedConstraintData2 btTypedConstraintDoubleData +#define btTypedConstraintDataName "btTypedConstraintDoubleData" +#else +#define btTypedConstraintData2 btTypedConstraintFloatData +#define btTypedConstraintDataName "btTypedConstraintFloatData" +#endif //BT_USE_DOUBLE_PRECISION + + class btSerializer; //Don't change any of the existing enum values, so add enum types at the end for serialization compatibility @@ -34,6 +43,7 @@ enum btTypedConstraintType CONTACT_CONSTRAINT_TYPE, D6_SPRING_CONSTRAINT_TYPE, GEAR_CONSTRAINT_TYPE, + FIXED_CONSTRAINT_TYPE, MAX_CONSTRAINT_TYPE }; @@ -356,6 +366,33 @@ SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScal } ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 +struct btTypedConstraintFloatData +{ + btRigidBodyFloatData *m_rbA; + btRigidBodyFloatData *m_rbB; + char *m_name; + + int m_objectType; + int m_userConstraintType; + int m_userConstraintId; + int m_needsFeedback; + + float m_appliedImpulse; + float m_dbgDrawSize; + + int m_disableCollisionsBetweenLinkedBodies; + int m_overrideNumSolverIterations; + + float m_breakingImpulseThreshold; + int m_isEnabled; + +}; + +///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 + +#define BT_BACKWARDS_COMPATIBLE_SERIALIZATION +#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION +///this structure is not used, except for loading pre-2.82 .bullet files struct btTypedConstraintData { btRigidBodyData *m_rbA; @@ -377,10 +414,35 @@ struct btTypedConstraintData int m_isEnabled; }; +#endif //BACKWARDS_COMPATIBLE + +struct btTypedConstraintDoubleData +{ + btRigidBodyDoubleData *m_rbA; + btRigidBodyDoubleData *m_rbB; + char *m_name; + + int m_objectType; + int m_userConstraintType; + int m_userConstraintId; + int m_needsFeedback; + + double m_appliedImpulse; + double m_dbgDrawSize; + + int m_disableCollisionsBetweenLinkedBodies; + int m_overrideNumSolverIterations; + + double m_breakingImpulseThreshold; + int m_isEnabled; + char padding[4]; + +}; + SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferSize() const { - return sizeof(btTypedConstraintData); + return sizeof(btTypedConstraintData2); } |