[ODE] trimesh inertia

gero.mueller@cloo.de gero.mueller at cloo.de
Sun Oct 29 05:49:17 MST 2006


Hello!

I'd like to contribute the function dMassSetTrimesh, based on this  
paper and code:
http://jgt.akpeters.com/papers/Mirtich96/
It worked very good in my own old physics engine.

I just browsed through the trimesh code and was quite shocked. There  
are some lines of VERY bad code:
collision_trimesh_internal.h, the GetVertex function for example:
1. it never returns anything: out not a reference
2. it converts all vertices to float instead to the precision of dVector3

Alot of trimesh vertex/triangle functions are broken too:

int dGeomTriMeshGetTriangleCount (dGeomID g)
{
     dxTriMesh* Geom = (dxTriMesh*)g;
     return 0;
}

Now my questions:

1. when provide some patches, will they be intergrated, or will my  
work be for nothnig (provided the quality is ok of course..)
2. Do the members of dxTriMeshData always contain the vertices and  
indices? With OPCODE and GIMPACT, so that i can use them safely?

Greetings
Gero



More information about the ODE mailing list