[ODEJava] Space and Sub-space

Hello everybody,

I’m trying to make collision working with ODEJava between sub-spaces.

After a lot of experiments I started to think that it’s impossible with odejava (maybe with ODE as reported on the Guide) even becouse the examples (The Car) use only one space for all geometries.

The mecanism of witch collisions are tested in ODEJava is different from ODE (that use the callback function), and I cannot understand how to do it with ODEJava.

Please, can anybody help me?

There is someone that can spend five minute for answer me?

Thanks anyway.

Hmm I dunno, but I would just create a new space containing the geoms of the sub-Spaces.
Why are you using sub-spaces anyways?

From the ODE user’s guide:

Other spaces that are contained within the colliding space are not treated specially, i.e. they are not recursed into. The callback function may be passed these contained spaces as one or both geom arguments.

So it seems that sub-spaces are not automatically handled by ODE. I think this would be a useful feature (I’d use it), so maybe we can think of a way to build it into odejava. Looking at the odejava code, it looks like this change would have to go into the native libraries.

Looking at the C++ code:

It looks like the only difference between nearCallback and nearCallback2 is that nearCallback2 recurses into sub-spaces. So should we be using nearCalback2 for spaceCollide?