[ODE] 3Ds to Trimesh

Rob Ruck bobruck at btinternet.com
Sun Oct 12 13:51:18 MST 2003


On 11 Oct 2003 at 23:21, Frederik Schneider wrote:

> 
> Hi
> 
> I know, that's a little bit off topic I excuse me for that, but I'm absolutely stuck with this.
> Does anyone of you have a little sample code demonstrating, how the vertex data of e.g. a 3ds file 
> can be given to ODE as a TriMesh ?
> I basicaly know how to read the vertices out of the 3Ds file and I think I know what the 
> dGeomTriMeshDataBuild(...) function needs, but my application always crashes, after I fed ODE 
> with my values, so there must be something wrong with my data, maybe the order of the triangles 
> (indices), I don't know.
> I would be very happy, if I get this to work, cause my whole project is stopped by this at the 
> moment.
> 
> Regards
>  Frederik Schneider
> 

Presumably, you are getting the vertices as triangles ?

If you are, and they are in sequential order, the indices are simply (0,1,2,etc.), 
the only crash i received when doing tri meshes, was in fetchtriangle, and i 
finally tracked it down to the fact that the index and vertex lists that you 
supply to the build function are required by it afterwards, i.e. it doesn't make 
its own copies. I was freeing them up after feeding them in, it found freed 
memory and crashed.

HTH
--Rob Ruck
--ICQ#66577271
--mailto:bobruck at btinternet.com



More information about the ODE mailing list