[ODE] enhanced ODE collision API

David McClurg dmcclurg at pandemicstudios.com.au
Thu Oct 24 15:25: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.

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).

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

Ta