Need some help with btSoftBodyHelpers::CreateFromTriMesh

Post Reply
stig atle
Posts: 11
Joined: Sat May 10, 2014 9:22 am

Need some help with btSoftBodyHelpers::CreateFromTriMesh

Post by stig atle »

Hi,
I've been trying for a while to get support for softbodies in my project,
I have already added all primitives, including static triangle meshes as you can see below:

Image

I've now been trying to implement the softbodies.
I do have triangle shapes as I mentioned, and I thought I could re-use the triangulation code to
create softbody objects with the function:

Code: Select all

btSoftBody* psb = btSoftBodyHelpers::CreateFromTriMesh(.....);
I successfully did this with the bunny mesh that's hardcoded, but now I want to insert any trinangulated mesh into this function.
But I'm a bit lost figuring out exactly what parameters to send in (how to get the right arrays and indexes from my triangulated mesh).

Do anyone of you have a example of this? (not a hardcoded one, but from a

Code: Select all

btTriangleMesh *mTriMesh = new btTriangleMesh();
type object? )
stig atle
Posts: 11
Joined: Sat May 10, 2014 9:22 am

Re: Need some help with btSoftBodyHelpers::CreateFromTriMesh

Post by stig atle »

Got the help I needed with this here:

https://stackoverflow.com/questions/261 ... th-trimesh
Post Reply