Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-11-13 00:05:10 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-11-13 00:05:10 +0300
commit3a1b7ece402001f2f93669a7b36c32f5e7827bab (patch)
treea91e600407b0709922b7df3fa2a53f380cf7eb76 /extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
parent22d97b2e346e3cb3fc38704a0460e2dd4d9a0abb (diff)
updating Bullet 2.x with latest changes. The integration + C-API will follow at some stage.
Diffstat (limited to 'extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h')
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
index fca3658cb31..c5fecdb87a6 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
@@ -62,7 +62,11 @@ class btRigidBody : public btCollisionObject
public:
+#ifdef OBSOLETE_MOTIONSTATE_LESS
+ //not supported, please use btMotionState
btRigidBody(float mass, const btTransform& worldTransform, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=0.f,btScalar angularDamping=0.f,btScalar friction=0.5f,btScalar restitution=0.f);
+#endif //OBSOLETE_MOTIONSTATE_LESS
+
btRigidBody(float mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=0.f,btScalar angularDamping=0.f,btScalar friction=0.5f,btScalar restitution=0.f);
void proceedToTransform(const btTransform& newTrans);
@@ -71,11 +75,11 @@ public:
///but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast
static const btRigidBody* upcast(const btCollisionObject* colObj)
{
- return (const btRigidBody*)colObj->m_internalOwner;
+ return (const btRigidBody*)colObj->getInternalOwner();
}
static btRigidBody* upcast(btCollisionObject* colObj)
{
- return (btRigidBody*)colObj->m_internalOwner;
+ return (btRigidBody*)colObj->getInternalOwner();
}
/// continuous collision detection needs prediction
@@ -247,7 +251,7 @@ public:
inline void updateDeactivation(float timeStep)
{
- if ( (GetActivationState() == ISLAND_SLEEPING) || (GetActivationState() == DISABLE_DEACTIVATION))
+ if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION))
return;
if ((getLinearVelocity().length2() < gLinearSleepingThreshold*gLinearSleepingThreshold) &&
@@ -257,7 +261,7 @@ public:
} else
{
m_deactivationTime=0.f;
- SetActivationState(0);
+ setActivationState(0);
}
}
@@ -265,14 +269,14 @@ public:
inline bool wantsSleeping()
{
- if (GetActivationState() == DISABLE_DEACTIVATION)
+ if (getActivationState() == DISABLE_DEACTIVATION)
return false;
//disable deactivation
if (gDisableDeactivation || (gDeactivationTime == 0.f))
return false;
- if ( (GetActivationState() == ISLAND_SLEEPING) || (GetActivationState() == WANTS_DEACTIVATION))
+ if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
return true;
if (m_deactivationTime> gDeactivationTime)
@@ -309,6 +313,8 @@ public:
void setMotionState(btMotionState* motionState)
{
m_optionalMotionState = motionState;
+ if (m_optionalMotionState)
+ motionState->getWorldTransform(m_worldTransform);
}
//for experimental overriding of friction/contact solver func