[ODE] Creating a TriList heightmap geom

Paul Hunkin PWHUNK at stpeters.school.nz
Mon May 12 03:27:03 2003


Well, I've got the TriList, OpCode and ODE working together, and the
examples compile and run fine :)

So, now I'm faced with the problem of how to create the Tri-mesh for my
heightmap. I'm sure there's a really simple solution, but I can't seem
to find it :/

The TriList build func is:
dGeomTriListBuild(TriList, Vertices, sizeof(dcVector3), VertexCount,
Indices, sizeof(int), IndexCount, 3 * sizeof(int));
   
I have the vertices in correctly (just transferred them from my
heightmap into a dcVector3 array) but the Indices have me stumped. How
do I find / generate these? I tried a couple of things, but they
produced some really weird (and non-working, obviously) results. Failing
that, does anyone have any links to an example of generating a TriList
from a heightmap?


Thanks :)



-paul