How to use the TriangleMeshShape class?

dragon2
Posts: 6
Joined: Fri Feb 06, 2009 3:43 am

How to use the TriangleMeshShape class?

Post by dragon2 »

if i have one model,
How to use it in bullet's world?
Can i use the TriangleMeshShape class to do?
How to use the TriangleMeshShape class?
Can you show me some source code?
mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

Re: How to use the TriangleMeshShape class?

Post by mickey »

Hi

Actually you don't use that class directly but you use btBvhTriangleMeshShape instead - to represent your static world's shape.

For instance, on my DirectX application, after I load my mesh into a D3DXMESH instance, I extract the vertices and indices and load pass them into the constructor of btBvhTriangleMeshShape.

Hope that helps.
dragon2
Posts: 6
Joined: Fri Feb 06, 2009 3:43 am

Re: How to use the TriangleMeshShape class?

Post by dragon2 »

Thank very much!