Hey, thanks for your help!
Ok, I've replaced
dbLockVertexDataForMesh with
dbLockVertexDataForLimb, and used it for limb 0 (I'm testing with a primitive box, so all vertex data should be in this limb). But the result is still the same.
It may have something to do with how ODE reads the mesh data?!
I'm googling like hell to find out right now...
The problem is that the sample that came with ODE uses a simple float array of a fixed size to create the vertex data, and my array
dVector3 * vertices = new dVector3[vertexcount] depends on the vertex count. I'm not a C++ pro (but not a noob either), so I don't know how to dynamically create a 2-dimensional float-array! Can you help me out?
Thanks on 1) and 2), you explained it very well
These wicked primitives...
Now I know what I'm dealing with
EDIT:
Here are a few snippets of how the ODE tri-mesh sample does it:
Data structure:
static float Vertices[VertexCount][3];
static dTriIndex Indices[IndexCount];
Vertices-Array is filled with data like this:
Vertices[0][0] = -Size[0];
Vertices[0][1] = -Size[1];
Vertices[0][2] = Size[2];
Vertices[1][0] = Size[0];
Vertices[1][1] = -Size[1];
Vertices[1][2] = Size[2];
...
...
Indices-Array is filled like this:
Indices[0] = 0;
Indices[1] = 1;
Indices[2] = 4;
Indices[3] = 1;
Indices[4] = 2;
Indices[5] = 4;
...
...
And finally the tri-mesh is build like this:
dTriMeshDataID Data = dGeomTriMeshDataCreate();
dGeomTriMeshDataBuildSingle( Data, Vertices[0], 3 * sizeof(float), VertexCount, &Indices[0], IndexCount, 3 * sizeof(dTriIndex) );
TriMesh = dCreateTriMesh(space, Data, 0, 0, 0);
Maybe someone is so kind to guide me a little
Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.