[ODE] merge dxGeomTransform & dxGeomGroup
Tim Schmidt
tisch at uni-paderborn.de
Thu Apr 4 15:53:02 2002
Hello list!
I am currently writing a Java Native Interface layer for ODE to get
physics into Java3D.
Fortunately most things work well so far, but now I got a little bit
stuck because of some structural differences.
Some of you will know the TransformGroup nodes in Java3D, OpenInventor
or other 3d-graphics libraries that use scene graphs. It encapsulates a
group of primitives or other nodes and gives them one common transform.
Unfortunately there does not exist a comparable single object in ODE.
My first thought was to put a GeomGroup of objects under (or in) a
GeomTransform. But that surely did not work as requested. Though you can
set the position of the group, this has not any effect to the underlying
objects.
But what about merging the dxGeomGroup and dxGeomTransform classes into
one dxGeomTransformGroup class.
===>
struct dxGeomTransformGroup {
dArray<dxGeom*> parts; // all the geoms that are being transformed
int cleanup; // 1 to destroy obj when destroyed
dVector3 tr_pos; // position offset
dMatrix3 tr_R; // rotational component of the transformation
};
Surely the functions 'dCollide_XX_', 'compute_final_tx' 'd_XX_AABB' and
maybe some others has to be adopted and changed appropriately.
So, has anybody of you ever thought of that? Or do you know any reason
why this won't work?
Thanks
Tim