Improved BulletSoftBody serialization, added cluster support. Joints and copying data from GPU back to softbody are the main todo.

Updated the Bullet/Demos/SerializeDemo to load .bullet files with the softbody data.

BulletSoftBody should use getWorldTransform and not getInterpolationWorldTransform
Fix btBulletWorldImporter so that it creates a copy of the index/vertex data, this prevents crashes when deleting the .bullet file with triangle meshes.
This commit is contained in:
erwin.coumans
2010-12-03 03:11:21 +00:00
parent 032c6bfe2c
commit 6173a30bce
9 changed files with 964 additions and 472 deletions

View File

@@ -396,7 +396,7 @@ public:
const btTransform& xform() const
{
static const btTransform identity=btTransform::getIdentity();
if(m_collisionObject) return(m_collisionObject->getInterpolationWorldTransform());
if(m_collisionObject) return(m_collisionObject->getWorldTransform());
if(m_soft) return(m_soft->m_framexform);
return(identity);
}
@@ -665,9 +665,13 @@ public:
//
/* ctor */
btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count,
const btVector3* x,
const btScalar* m);
btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count, const btVector3* x, const btScalar* m);
/* ctor */
btSoftBody( btSoftBodyWorldInfo* worldInfo);
void initDefaults();
/* dtor */
virtual ~btSoftBody();
/* Check for existing link */