[ODE] using a different collision library

Andreas Beckermann b_mann at gmx.de
Mon Oct 1 15:58:06 MST 2007


Hi
I'm afraid I can't see how to make this work:
dGeomID is indeed a dxGeom*, however dxGeom is in collision_kernel.h, which is 
an internal header. Furthermore ODE defines a public C interface only, so 
deriving from a class seems somewhat weird to me here :-)

I just can't seem to find a way to make the instructions from the manual 
quoted by Gregor work - it says we should implement our own dGeomMoved() (and 
others) function, however ODE already provides such a function, so the symbol 
already is defined in the library.
gcc on Linux does accept that (we have not yet investigated _why_ it accepts 
that and if it actually works...) but the MS Visual C++ Studio 2005 (MSVC8 I 
think) linker does not, it reports a conflicting symbol (which is what I 
would have expected).

Also we haven't been able (yet?) to find some code that already makes use of 
this ODE feature (using a different collision library) - maybe this part of 
the manual is just an artifact of a previous version where this used to be 
possible? Or is the user supposed to modify ODE and distribute a modified 
version with dGeomMoved() and friends replaced by our own functions?
At least one Open Source project we've found (flatland, see 
http://flatland.sf.net) that uses different collision detection seems to do 
it this way.

>From a practical point of view this approach would not be a problem to us (the 
project group at the university of Dortmund that Gregor mentioned), since we 
are developing a collision detection library and an interface to a physics 
library is meant for debugging and presentation purposes only. Therefore we 
have direct control on the library versions we use and could easily depend on 
our own, modified, version of ODE.
However we'd much rather like to go a more generic, cleaner way, so that after 
the completion of our project, other research projects may be able to use our 
test applications to develop their own collision detection algorithms and 
directly compare them to those we already have implemented. For this, 
_recent_ versions of the libraries would be very helpful (which would be 
impossible if we had to provide a modified ODE version).

So we'd be really happy if someone could point us to some 
code/FAQ/tutorial/whatever that explains in greater detail than the manual in 
the ODE wiki how to use a different collision detection library (read: 
something that points out what we're missing).

Thanks for your help

CU
Andi

On Thursday 27 September 2007, Jon Watte (ODE) wrote:
> If I remember correctly:
> dGeomID is just a dGeom *. You should derive your proxy from dGeom, and
> then treat any pointer-to-proxy as a dGeomID.
>
> Cheers,
>
>           / h+
>
> Gregor Jochmann wrote:
> > #include <ode/ode.h>
> >
> > typedef dcollide::Proxy* dGeomID;
> >
> > extern "C" {
> > void dGeomMoved (dGeomID movedGeom) { //.... }
> >
> > dGeomID dGeomGetBodyNext (dGeomID geom) { //.... }
> >
> > void dGeomSetBody (dGeomID geom, dBodyID body) { //... }
> > }
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode





More information about the ODE mailing list