Page 1 of 1

Need some help with btSoftBodyHelpers::CreateFromTriMesh

Posted: Mon Sep 29, 2014 6:17 pm
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? )

Re: Need some help with btSoftBodyHelpers::CreateFromTriMesh

Posted: Thu Oct 16, 2014 4:49 am
by stig atle
Got the help I needed with this here:

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