[ODE] Laser range finder

Jon Watte hplus-ode at mindcontrol.org
Sun Sep 19 14:22:54 MST 2004


To paraphrase the documentation (did you search for "ray" ?)

1) create a dRay geom
2) set the position and direction appropriately using the dRay functions
3) set the length to be the total size of your world
4) run dSpaceCollide2() to collide your ray against the world
5) the contact you get back from within dCollide has a "depth" value which is the length of the ray to the contact -- remember, and use, the smallest depth returned

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Ivan Tanev
Sent: Friday, September 17, 2004 10:52 PM
To: ODE mailing list
Subject: [ODE] Laser range finder 


Hi,

I am trying to simulate a laser range finder in ODE & GLScene. The laser is shooting a "ray", which depending on (i) the position and orientation of the laser and (ii) the position, orientation and size of objects (obstacles, the ground plane, etc.) in the world may (or may not) "hit" some of these objects. Could you help me please: how to compute the "length" of such "ray".

Thank you,

Sincerely,

Ivan




More information about the ODE mailing list