[Opal-commits] opal/src/ODE ODESimulator.cpp,1.94,1.95
Status: Inactive
Brought to you by:
tylerstreeter
|
From: tylerstreeter <tyl...@us...> - 2005-03-30 23:26:33
|
Update of /cvsroot/opal/opal/src/ODE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4745/src/ODE Modified Files: ODESimulator.cpp Log Message: implemented InclineSensor; added code for Ogre sample apps Index: ODESimulator.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/ODE/ODESimulator.cpp,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** ODESimulator.cpp 25 Mar 2005 02:44:20 -0000 1.94 --- ODESimulator.cpp 30 Mar 2005 23:26:23 -0000 1.95 *************** *** 756,760 **** ODESimulator* sim = (ODESimulator*)data; ! // Get pointers to the two geoms' GeomData structure. GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); --- 756,761 ---- ODESimulator* sim = (ODESimulator*)data; ! // Get pointers to the two geoms' GeomData structure. Both ! // of these should always be non-NULL. GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); *************** *** 815,827 **** // Colliding two geoms. // Get a pointer to the ODESimulator. ODESimulator* sim = (ODESimulator*)data; ! // Get pointers to the two geoms' GeomData structure. GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); ! // Only one of these (the one NOT belonging to the ray geom) ! // will be non-NULL. unsigned int geomContactGroup = defaults::shape::contactGroup; if (geomData0) --- 816,836 ---- // Colliding two geoms. + // Sometimes we get a case where the ray geom is passed in + // as both objects, which is stupid. + if (o0 == o1) + { + return; + } + // Get a pointer to the ODESimulator. ODESimulator* sim = (ODESimulator*)data; ! // Get pointers to the two geoms' GeomData structure. One ! // of these (the one NOT belonging to the ray geom) ! // will always be non-NULL. GeomData* geomData0 = ((GeomData*)dGeomGetData(o0)); GeomData* geomData1 = ((GeomData*)dGeomGetData(o1)); ! // Find the contact group of the collided Solid. unsigned int geomContactGroup = defaults::shape::contactGroup; if (geomData0) |