[ODE] enhanced ODE collision API

Erwin de Vries erwin at vo.com
Thu Oct 24 16:20:02 2002


> struct dContactGeom {
>   dVector3 pos;       // contact position
>   dVector3 normal;    // normal vector
>   dReal depth;        // penetration depth
>   dGeomID g1,g2;      // the colliding geoms
> };
>
> A 'dTriMeshClass' geom is really an aggregate type so I need to know the
index of the triangle to lookup material properties.  The material
properties tell me how to create the contact, light the player, etc.

You need the index of the triangle in the near callback when creating the
joint? Hm.. Do you have a suggestion?

> Also, it would be handy to expose erwin's combine contacts functionality.
It seems to be essential even between meshes/planes in my game (i'll post
some test programs soon to show this).

You're actually using the mesh-plane intersection?? Daring.

My contact-combine code only works for spheres-triangle contacts. Its
actually there because ODE doesnt like many close contacts.

>   int dCombineContacts(int n, dContactGeom* Contacts, int Stride);
>   // Attempts to merge all contacts into a single contact
>   // returns 1 if successful and 'n' otherwise

This would be very nice. But you should probably add a dReal MaxError as
parameter, because without it it would be very hard.

Erwin