[ODE] geom group patch

David McClurg dmcclurg at pandemicstudios.com.au
Tue Oct 8 15:32:02 2002


now that i'm using geom groups more, i had to add a query function to see if a geom was in a group

int dGeomGroupQuery (dxGeom *g, dxGeom *x)
{
  dUASSERT (g && g->_class->num == dGeomGroupClass,"argument not a geomgroup");
  dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g);
  for (int i=0; i < gr->parts.size(); i++) {
    if (gr->parts[i] == x) {
      return 1;
    }
  }
  return 0;
}