[ODE] "synchronous" ray intersection tests?
Darío Mariani
mariani.dario at gmail.com
Fri Aug 5 10:14:34 MST 2005
Here is what I'm experimenting with: I have two types of geometries,
the first group are the usual geometries wich collide in the usual
way, the second group are sensor geometries wich when they collide
with a geometry from the first group it reports this event instead of
generating a contact group. In this way I build my objects with shapes
and sensors and have only one collision callback that looks like this:
collision (dGeom o1, dGeom 02):
do stuff for space collision and check if o1 and o2 should collide
if o1 is a sensor and o2 is a sensor ==> return
if o1 is a shape and o2 is a shape ==> generate contact group
if o1 is a sensor and o2 is a shape ==> report o1 detected o2
if o2 is a sensor and o1 is a shape ==> report o2 detected o1
Darío
On 8/4/05, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
>
> > Is there a reasonable way, performance-wise, that I can make
> > "throw-away" line intersection tests like above with ODE and
> > encapsulate it in a method that will give me my result right away? I
>
> Sure. You can implement that very function, by having it call
> dCollide between a "utility" ray that you create at start-up, and change
> using the parameters given for each query, and the geometry of the
> world. Capture the results in a static variable (or send in a
> pointer-to-result-storage) in a specially formulated near-callback function.
>
> Btw: CarWorld does this all over the place :-)
>
> Cheers,
>
> / h+
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list