Odejava - GeomRay

Hi,

has anyone got geomray to generate contacts with other (static) geoms? I got it working for geoms added to a body, but no contacts are generated for enviroment geoms.

EDIT:
Well, think I found the reason. In nearCallBack in odejava.cpp:

// ignore if both o1 and o2 are plain Geoms (not bodies)
if (!b1 && !b2) return;


Work around? Should I try the tedious path of recompiling odejava.dll?

You don’t normally want static geoms colliding with other static geoms. What would be the point? the geoms are imovable and so have no possible use for the contact information.

The point with ray - geom collision would be to implement ray cars for instance - shooting rays towards the static triangle mesh instead of using jointed spheres for wheels. Or, if a car has flipped over, you could shoot a ray from the car to detect where to drop the car again.

What about

static int 	org.odejava.ode.Ode.dCollide(SWIGTYPE_p_dGeomID o1, SWIGTYPE_p_dGeomID o2, int flags, dContactGeom contact, int skip)

Yeah. That method arne has pointed out shorts curcuits all the nearcall back stuff and should call the specific ray-geom collider for you. I beleive dContactGeom contact may be an array… it gets filled up with all the contacts between the two geometries. I am not sure how you setup the object properly using ODEjava.

yeah, dCollide would probably work, but then I’d have to collide the ray with all static geoms my self. And I never got dCollide to work with more contacts than one.