diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-03-07 21:53:16 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-03-07 21:53:16 +0400 |
commit | 643b0be4cb3f73bd876493d2a7bd6f76ef27cf06 (patch) | |
tree | 33fa8c08a902176f4204b6cc6a18702997bd90ba /extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h | |
parent | 46d32c89f6df911120579d00dd6e1246536cb6d8 (diff) |
bullet: Update to current svn, r2636
Apply patches in patches directory, remove patches that were applied
upstream.
If you made changes without adding a patch, please check.
Fixes [#32233] exporting bullet format results in corrupt files.
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h index a16e869a973..441fa375050 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -16,9 +16,10 @@ subject to the following restrictions: #ifndef BT_TYPED_CONSTRAINT_H #define BT_TYPED_CONSTRAINT_H -class btRigidBody; + #include "LinearMath/btScalar.h" #include "btSolverConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" class btSerializer; @@ -32,6 +33,7 @@ enum btTypedConstraintType SLIDER_CONSTRAINT_TYPE, CONTACT_CONSTRAINT_TYPE, D6_SPRING_CONSTRAINT_TYPE, + GEAR_CONSTRAINT_TYPE, MAX_CONSTRAINT_TYPE }; @@ -51,8 +53,17 @@ enum btConstraintParams #endif +ATTRIBUTE_ALIGNED16(struct) btJointFeedback +{ + btVector3 m_appliedForceBodyA; + btVector3 m_appliedTorqueBodyA; + btVector3 m_appliedForceBodyB; + btVector3 m_appliedTorqueBodyB; +}; + + ///TypedConstraint is the baseclass for Bullet constraints and vehicles -class btTypedConstraint : public btTypedObject +ATTRIBUTE_ALIGNED16(class) btTypedConstraint : public btTypedObject { int m_userConstraintType; @@ -80,6 +91,7 @@ protected: btRigidBody& m_rbB; btScalar m_appliedImpulse; btScalar m_dbgDrawSize; + btJointFeedback* m_jointFeedback; ///internal method used by the constraint solver, don't use them directly btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact); @@ -87,6 +99,8 @@ protected: public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + virtual ~btTypedConstraint() {}; btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA); btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB); @@ -195,7 +209,7 @@ public: ///internal method used by the constraint solver, don't use them directly - virtual void solveConstraintObsolete(btRigidBody& /*bodyA*/,btRigidBody& /*bodyB*/,btScalar /*timeStep*/) {}; + virtual void solveConstraintObsolete(btSolverBody& /*bodyA*/,btSolverBody& /*bodyB*/,btScalar /*timeStep*/) {}; const btRigidBody& getRigidBodyA() const @@ -246,6 +260,22 @@ public: return m_userConstraintPtr; } + void setJointFeedback(btJointFeedback* jointFeedback) + { + m_jointFeedback = jointFeedback; + } + + const btJointFeedback* getJointFeedback() const + { + return m_jointFeedback; + } + + btJointFeedback* getJointFeedback() + { + return m_jointFeedback; + } + + int getUid() const { return m_userConstraintId; |