[ODE] Changing Position To Geometry Groups

Sergio Casas Yrurzum scasas at glup.irobot.uv.es
Thu Mar 14 08:27:01 2002


Hi everybody!

I'm writing a simulation program with ODE and I have a little problem with
GeomGroups. My question is:
Is it possible to move a GeomGroup position?

My code is something like that:

IdGroup = dCreateGeomGroup(IdSpace);

IdGeometry1 = dCreateSphere(0,dRadius1);
IdTransformation1 = dCreateGeomTransform(0);
dGeomTransformSetCleanup(IdTransformation1,0);
dGeomTransformSetGeom(IdTransformation1,IdGeometry1);
dGeomSetPosition(IdGeometry1,0.0,5.0,0.0);
dGeomGroupAdd(IdGroup,IdTransformation1);

IdGeometry2 = dCreateSphere(0,dRadius2);
IdTransformation2 = dCreateGeomTransform(0);
dGeomTransformSetCleanup(IdTransformation2,0);
dGeomTransformSetGeom(IdTransformation2,IdGeometry2);
dGeomSetPosition(IdGeometry2,0.0,-5.0,0.0);
dGeomGroupAdd(IdGroup,IdTransformation2);

...
...
...
and so on

...and I try to move all the geometries simply changing the group's
position:

dGeomSetPosition(IdGroup,10.0,10,0.0);

but the GeomGroup does not move ( remains at (0,0,0) ). Is this a bug,
something not yet implemented (but documented) or (most probably) something
wrong on my code?


Thank you in advance and congralutions to Russell for the work he has done
with ODE.