more Bullet serialization (uncompleted triangle mesh saving, work-in-progress)

This commit is contained in:
erwin.coumans
2010-01-23 02:13:25 +00:00
parent 5378cf4c8a
commit 5e85d43b0b
5 changed files with 240 additions and 2 deletions

View File

@@ -207,3 +207,18 @@ btVector3 btTriangleMeshShape::localGetSupportingVertex(const btVector3& vec) co
return supportVertex;
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
const char* btTriangleMeshShape::serialize(void* dataBuffer, btSerializer* serializer) const
{
btTriangleMeshShapeData* trimeshData = (btTriangleMeshShapeData*) dataBuffer;
btCollisionShape::serialize(&trimeshData->m_collisionShapeData,serializer);
m_meshInterface->serialize(&trimeshData->m_meshInterface, serializer);
trimeshData->m_collisionMargin = m_collisionMargin;
return "btTriangleMeshShapeData";
}