diff options
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h')
-rw-r--r-- | extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h index ed90fb44115..1d177db802a 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h @@ -41,10 +41,13 @@ extern bool gDisableDeactivation; enum btRigidBodyFlags { BT_DISABLE_WORLD_GRAVITY = 1, - ///The BT_ENABLE_GYROPSCOPIC_FORCE can easily introduce instability - ///So generally it is best to not enable it. - ///If really needed, run at a high frequency like 1000 Hertz: ///See Demos/GyroscopicDemo for an example use - BT_ENABLE_GYROPSCOPIC_FORCE = 2 + ///BT_ENABLE_GYROPSCOPIC_FORCE flags is enabled by default in Bullet 2.83 and onwards. + ///and it BT_ENABLE_GYROPSCOPIC_FORCE becomes equivalent to BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY + ///See Demos/GyroscopicDemo and computeGyroscopicImpulseImplicit + BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT = 2, + BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD=4, + BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY=8, + BT_ENABLE_GYROPSCOPIC_FORCE = BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY, }; @@ -87,7 +90,7 @@ class btRigidBody : public btCollisionObject //m_optionalMotionState allows to automatic synchronize the world transform for active objects btMotionState* m_optionalMotionState; - //keep track of typed constraints referencing this rigid body + //keep track of typed constraints referencing this rigid body, to disable collision between linked bodies btAlignedObjectArray<btTypedConstraint*> m_constraintRefs; int m_rigidbodyFlags; @@ -506,8 +509,6 @@ public: return (getBroadphaseProxy() != 0); } - virtual bool checkCollideWithOverride(const btCollisionObject* co) const; - void addConstraintRef(btTypedConstraint* c); void removeConstraintRef(btTypedConstraint* c); @@ -531,7 +532,18 @@ public: return m_rigidbodyFlags; } - btVector3 computeGyroscopicForce(btScalar maxGyroscopicForce) const; + + + + ///perform implicit force computation in world space + btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const; + + ///perform implicit force computation in body space (inertial frame) + btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const; + + ///explicit version is best avoided, it gains energy + btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const; + btVector3 getLocalInertia() const; /////////////////////////////////////////////// |