refactor constraint serialization, so that double precision is maintained,
changes are backwards compatible (btBulletWorldImporter can load old .bullet files) but not forwards compatible (constraints in new .bullet files are ignored/unrecognized by old Bullet SDK) This commit is for Issue 734. Some more work needs to be done for btGImpactMeshShapeDoubleData and thus btStridingMeshInterfaceDoubleData and btMeshPartDoubleData
This commit is contained in:
@@ -898,9 +898,17 @@ void SerializeDemo::exitPhysics()
|
||||
{
|
||||
|
||||
//cleanup in the reverse order of creation/initialization
|
||||
//removed/delete constraints
|
||||
int i;
|
||||
for (i=m_dynamicsWorld->getNumConstraints()-1; i>=0 ;i--)
|
||||
{
|
||||
btTypedConstraint* constraint = m_dynamicsWorld->getConstraint(i);
|
||||
m_dynamicsWorld->removeConstraint(constraint);
|
||||
delete constraint;
|
||||
}
|
||||
|
||||
//remove the rigidbodies from the dynamics world and delete them
|
||||
int i;
|
||||
|
||||
for (i=m_dynamicsWorld->getNumCollisionObjects()-1; i>=0 ;i--)
|
||||
{
|
||||
btCollisionObject* obj = m_dynamicsWorld->getCollisionObjectArray()[i];
|
||||
|
||||
Reference in New Issue
Block a user