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:
@@ -162,6 +162,11 @@ void btBulletFile::parseData()
|
||||
m_constraints.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_QUANTIZED_BVH_CODE)
|
||||
{
|
||||
m_bvhs.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_COLLISIONOBJECT_CODE)
|
||||
{
|
||||
m_collisionObjects.push_back((bStructHandle*) id);
|
||||
|
||||
@@ -25,6 +25,8 @@ subject to the following restrictions:
|
||||
#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
|
||||
#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
|
||||
#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
|
||||
#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
|
||||
|
||||
#define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
|
||||
|
||||
|
||||
@@ -48,6 +50,8 @@ namespace bParse {
|
||||
btAlignedObjectArray<bStructHandle*> m_collisionShapes;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_constraints;
|
||||
|
||||
btAlignedObjectArray<bStructHandle*> m_bvhs;
|
||||
|
||||
btBulletFile();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user