Can somebody tell me how can I read all vertices positions using btTriangleMesh?
Thanks!
Accesing vertices from btTriangleMesh
-
- Posts: 39
- Joined: Thu Mar 24, 2011 3:50 pm
Re: Accesing vertices from btTriangleMesh
Or from btBvhTriangleMeshShape?
-
- Posts: 39
- Joined: Thu Mar 24, 2011 3:50 pm
Re: Accesing vertices from btTriangleMesh
Anybody out there?
I'm just trying to get the positions of the vertices of my mesh at one point of the simulation.
Please?
I'm just trying to get the positions of the vertices of my mesh at one point of the simulation.
Please?
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Accesing vertices from btTriangleMesh
If it's got a striding mesh interface you can use :
getLockedVertexIndexBase
getLockedVertexIndexBase
-
- Posts: 39
- Joined: Thu Mar 24, 2011 3:50 pm
Re: Accesing vertices from btTriangleMesh
Thank you very much for your answer!!
I'll try it out.
I'll try it out.
-
- Posts: 39
- Joined: Thu Mar 24, 2011 3:50 pm
Re: Accesing vertices from btTriangleMesh
The problem with getLockedVertexIndexBase is that it gives me the initial positions of the mesh, not the transformed vertices.
How can I find or calculate the current positions of the vertices?
How can I find or calculate the current positions of the vertices?
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Accesing vertices from btTriangleMesh
I don't think that it stores the transformed version of the meshes so you'd need to transform the data in the meshInterface by the worldTranform of the shape (and the rigidbody) to get the final positions in worldspace..