for for btBvhTriangleMeshShape with short int indices serialization

disable bvh serialization, it has issues (needs testing)
This commit is contained in:
erwin.coumans
2010-02-27 09:16:42 +00:00
parent aab5652e7d
commit d5ea1d569f
13 changed files with 607 additions and 594 deletions

View File

@@ -106,8 +106,8 @@ btTriangleIndexVertexArray* btBulletWorldImporter::createMeshInterface(btStridin
} else
{
meshPart.m_indexType = PHY_SHORT;
meshPart.m_triangleIndexStride = 3*sizeof(short int);
meshPart.m_triangleIndexBase = (const unsigned char*)meshData.m_meshPartsPtr[i].m_indices16;
meshPart.m_triangleIndexStride = sizeof(btShortIntIndexTripletData);
meshPart.m_triangleIndexBase = (const unsigned char*)meshData.m_meshPartsPtr[i].m_3indices16;
}
if (meshData.m_meshPartsPtr[i].m_vertices3f)
@@ -344,7 +344,7 @@ btCollisionShape* btBulletWorldImporter::convertCollisionShape( btCollisionShap
btOptimizedBvh* bvh = 0;
#if 1
if (trimesh->m_quantizedFloatBvh)
{
btOptimizedBvh** bvhPtr = m_bvhMap.find(trimesh->m_quantizedFloatBvh);
@@ -369,6 +369,7 @@ btCollisionShape* btBulletWorldImporter::convertCollisionShape( btCollisionShap
bvh->deSerializeDouble(*trimesh->m_quantizedDoubleBvh);
}
}
#endif
btBvhTriangleMeshShape* trimeshShape = createBvhTriangleMeshShape(meshInterface,bvh);
@@ -481,7 +482,10 @@ bool btBulletWorldImporter::loadFileFromMemory( bParse::btBulletFile* bulletFil
btCollisionShapeData* shapeData = (btCollisionShapeData*)bulletFile2->m_collisionShapes[i];
btCollisionShape* shape = convertCollisionShape(shapeData);
if (shape)
{
// printf("shapeMap.insert(%x,%x)\n",shapeData,shape);
shapeMap.insert(shapeData,shape);
}
if (shape&& shapeData->m_name)
{