Hey all,
I'm currently using BulletPhys 2.81 and I'm trying to implement a btStridingMeshInterface to interface with a simple terrain-like mesh.
It seems that btStridingMeshInterface assumes that the mesh is indexed, and I was wondering why this is and if it's safe to pass a faux index buffer instead.
I intend to stripify all the meshes (or possibly generate optimal index buffers), but at this point in development none of my meshes are indexed.
I was wondering if I indeed have to use btStridingMeshInterface or if there is an alternative to btBvhTriangleMeshShape that I have missed.
Kind regards,
SC
btStridingMeshInterface assumes indexed mesh?
-
- Posts: 1
- Joined: Mon Mar 11, 2013 2:29 pm
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: btStridingMeshInterface assumes indexed mesh?
I'm not sure you can very easily ( if at all) . You could provide you own implementation of btStridingMesh and override the general processAllTriangles method without too many problems, but there are other areas of code (particularly btBvhTriangleMeshShape) that want to be able to lock the interface and get access to the vertex and index buffers for their own processing. I guess you could alter those as well but it might get a bit messy.
Alternatively , you could use btTriangleMeshShape and the addTriangle method for now(which will effectively build a copy of your vertex data and create the appropriate indices).
Alternatively , you could use btTriangleMeshShape and the addTriangle method for now(which will effectively build a copy of your vertex data and create the appropriate indices).