diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-11-13 00:05:10 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-11-13 00:05:10 +0300 |
commit | 3a1b7ece402001f2f93669a7b36c32f5e7827bab (patch) | |
tree | a91e600407b0709922b7df3fa2a53f380cf7eb76 /extern/bullet2/src/LinearMath/btDefaultMotionState.h | |
parent | 22d97b2e346e3cb3fc38704a0460e2dd4d9a0abb (diff) |
updating Bullet 2.x with latest changes. The integration + C-API will follow at some stage.
Diffstat (limited to 'extern/bullet2/src/LinearMath/btDefaultMotionState.h')
-rw-r--r-- | extern/bullet2/src/LinearMath/btDefaultMotionState.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/extern/bullet2/src/LinearMath/btDefaultMotionState.h b/extern/bullet2/src/LinearMath/btDefaultMotionState.h index 805631ac56f..6b85b37fb9e 100644 --- a/extern/bullet2/src/LinearMath/btDefaultMotionState.h +++ b/extern/bullet2/src/LinearMath/btDefaultMotionState.h @@ -19,16 +19,25 @@ struct btDefaultMotionState : public btMotionState } ///synchronizes world transform from user to physics - virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) + virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const { centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ; } ///synchronizes world transform from physics to user + ///Bullet only calls the update of worldtransform for active objects virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans) { m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ; } + + ///Bullet gives a callback for objects that are about to be deactivated (put asleep) + /// You can intercept this callback for your own bookkeeping. + ///Also you can return false to disable deactivation for this object this frame. + virtual bool deactivationCallback(void* userPointer) { + return true; + } + }; #endif //DEFAULT_MOTION_STATE_H |