[ODE] please help me about ODE!
=?gb2312?B?zfW41A==?=
wangg at gwtt.com
Tue Oct 18 19:34:44 MST 2005
I write code as below, and expecting the collision, but nothing happened, who can tell me why?
thanks a lot
//*************************************************************
dSpaceID RootSpace = dSimpleSpaceCreate(0);
dGeomID GeomID = dCreateSphere(0, 2.0f);
dGeomID t1 = dCreateGeomTransform(RootSpace);
dGeomTransformSetGeom(t1, GeomID);
dGeomSetPosition(t1, 0, 0, 0);
dGeomID t2 = dCreateGeomTransform(RootSpace);
dGeomTransformSetGeom(t2, GeomID);
dGeomSetPosition(t2, 0.5f, 0, 0);
const int N = 2;
dContactGeom contactGeom[N];
int n = dCollide(t1, t2, N, contactGeom, sizeof(contactGeom));
if ( n > 0 )
{
//do something if collision;
}
dSpaceDestroy(RootSpace);
//*************************************************************
More information about the ODE
mailing list