more refactoring, removed PhysicsInterface, cleaned up demos to make use of btDynamicsWorld derived classes.

removed two cached optimizations, type in btTransform and cached inverse transform (todo: test performance impact)
committed fixes that make the code adhere to 'who creates it, also destroys it'
This commit is contained in:
ejcoumans
2006-09-30 01:36:39 +00:00
parent 14397a2f72
commit d38549aa54
37 changed files with 317 additions and 995 deletions

View File

@@ -65,6 +65,16 @@ public:
void proceedToTransform(const btTransform& newTrans);
///to keep collision detection and dynamics separate we don't store a rigidbody pointer
///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;
}
static btRigidBody* upcast(btCollisionObject* colObj)
{
return (btRigidBody*)colObj->m_internalOwner;
}
/// continuous collision detection needs prediction
void predictIntegratedTransform(btScalar step, btTransform& predictedTransform) const;