Add support to serialize btOptimizedBvh/btQuantizedBvh for a btBvhTriangleMeshShape (using the new btSerializer). This is a new implementation, with full cross-platform support.
So it is different from the in-place method (btQuantizedBvh::serializeInPlace/deserializeInPlace). It is also possible to serialize/deserialize just the bvh, using the btSerializer (needs some code snippet/helper) See also http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4770
This commit is contained in:
@@ -209,16 +209,3 @@ btVector3 btTriangleMeshShape::localGetSupportingVertex(const btVector3& vec) co
|
||||
}
|
||||
|
||||
|
||||
///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 = float(m_collisionMargin);
|
||||
|
||||
return "btTriangleMeshShapeData";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user