I'm new to Bullet and I have a problem with creating mesh shapes with GImpact. I want to create a btGImpactMeshShape, but if I call the function updateBound(), my application crashes. Here is the code:
Code: Select all
btTriangleIndexVertexArray* m_indexVertexArrays = new btTriangleIndexVertexArray
(numTris,
&triIndex[0][0],
3*sizeof(int),
numVerts,
(btScalar*) vertValues,
sizeof(btScalar)*3);
btGImpactMeshShape* trimesh = new btGImpactMeshShape(m_indexVertexArrays);
trimesh->setLocalScaling(btVector3(1.f,1.f,1.f));
trimesh->setMargin(0.07f);
trimesh->updateBound();
I hope you can help me.
Regards,
Christin