[ODE] Subtractive Geometry

Adam D. Moss adam at gimp.org
Tue Mar 30 21:15:52 MST 2004


Brian Bell wrote:
> It seems to me that this is definitely doable with a custom geom class, that
> aggregates the existing geom classes.  The additive geoms could be
> represented internally as a standard composite geom.  The collision logic
> for the geom would be something like ( colliding with additive-composite &&
> !colliding with subtractive ).

Certainly, but that's not the hard bit...

> The only problem I see is supporting surface collisions along the
> subtractions.  It seems that this could be handled properly if all the geom
> classes handle interior surface collisions properly, which I'm almost
> positive they don't.

It's not a BIG deal to collide with the interior instead of the
exterior (off the top of my head, for most of the geoms it might
well be enough just to negate the contact depth).  The difficulty
which most people who propose a solution like this seem to miss (or
maybe I'm just not seeing the full simplicity) is that to collide a
geom with a CSG you're not just point-testing for inside/outside,
which is relatively easy to do on a composite in a boolean manner.
Rather, we unfortunately really have to care about the shape of the
resulting composite object for various reasons I can think of,
the primary one being that a colliding geom would have to be able
to respond to the edges and corners of the composite shape which
aren't trivially derived from or deferred to one or other of the
individual geom's collision functions.

--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3


More information about the ODE mailing list