Need some help with btSoftBodyHelpers::CreateFromTriMesh
Posted: Mon Sep 29, 2014 6:17 pm
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:
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:
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
type object? )
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:
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(.....);
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();