[ODE] Merging multiple geoms into a single trimesh - a few issues

Megan Fox shalinor at gmail.com
Fri Jan 14 10:45:58 MST 2005


If we're already storing 32 bits, might as well allow pointers.  In my
case, I tend to store the object pointer rather than any particular
material or similar value (and I then pass a COLLIDED_WITH event to
each object with the pointer of the other object, and let them do
whatever they want as far as extracting materials or just ignoring it
entirely)... so I'd end up building a secondary map from triangle
index to object pointer anyways, might as well skip that step if I
can.

-Megan Fox

> However, if we would be so bold as to add TWO 32-bit quantities to
> the contact struct, and label them "geomMaterial", then each of the
> geoms colliding could provide whatever is convenient. The non-trimesh
> geoms could have a dGeomSetMaterial() function which would return a
> hard-coded value; the trimesh would by default do that, but perhaps
> have an option to store the triangle index, OR store an integer
> stored within the triangle data. The quantities need to be 32-bit,
> because triangle vertex index values are 32-bit. Maybe we should
> make them size_t, so that a pointer could be stored, even.


More information about the ODE mailing list