[ODE] newbie says hi, asks questions

Jon Watte hplus-ode at mindcontrol.org
Mon Oct 4 08:14:33 MST 2004


> I am wondering two things.  Firstly, given a point in space,
> I would like to be able to query what bodies lie within a
> certain radius.  Is this possible, and if so, how does one
> go about it?

Create a Sphere geom. Position this Sphere geom where your 
point is, and make the radius of the sphere be the radius 
of interest. Run dSpaceCollide2() on the sphere and your 
world space; from the NearCallback call dCollide() as usual, 
and record anything that actually intersects the sphere.

Carworld does this for its explosions: http://www.mindcontrol.org/~hplus/carworld.html


> Secondly, is it possible to make bodies using CSG?  If
> not, would someone enlighten me on how one would go about
> implementing it, so I can see if I can pull it off? :)

By "bodies using CSG" I presume you mean "Geoms using CSG". 

The short answer is "no". The long answer is that you can do 
it yourself, by running CSG between the different shapes you 
are interested in, and tesselating the result to some level 
of precision into a triangle mesh; then feed the resulting 
triangle mesh to ODE for collision.


Cheers,

			/ h+





More information about the ODE mailing list