Cleaned up/simplified construction of a btRigidBody
Fixed memoryleak in btOptimizedBvh (delete []m_contiguousNodes;) Changed DemoApplication::localCreateRigidBody, so it adds the rigidbody to the btDynamicsWorld. Added check for duplicate objects in world when adding. Added assert to prevent setLinearVelocity on static rigidbodies Added btCollisionFilterGroups to btBroadphaseProxy removed duplicate 'btBroadphaseProxy* m_broadphaseProxy;' in btRigidBody
This commit is contained in:
@@ -72,9 +72,7 @@ public:
|
||||
//this create an internal copy of the vertices
|
||||
btCollisionShape* shape = new btConvexHullShape(&vertices[0],vertices.size());
|
||||
|
||||
btRigidBody* body = m_demoApp->localCreateRigidBody(isDynamic, mass, startTransform,shape);
|
||||
assert(body);
|
||||
m_demoApp->getDynamicsWorld()->addCollisionObject( body );
|
||||
btRigidBody* body = m_demoApp->localCreateRigidBody(mass, startTransform,shape);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user