[ODE] plane class with half space aabb - version with use of gflags

Pierre Terdiman p.terdiman at wanadoo.fr
Thu Jul 3 00:24:01 2003


> In the end I wonder if it was not much easier and even faster to
> relocate these tests completely into computeAABB() without using any
> precomputed gflag bits at all.
> ... not to mention the fact that a plane is actually meant to be
> unplaceable anyway. So normally computeAABB() is called only at the
> beginning.

Exactly what I do in my own engine, FYI. No bit flags, the plane's box gets
computed only once. However there's a "dirty bit" for all objects, telling
whether their box is valid or not. The bit is set each time the object's
position and/or rotation changes, and those have their bounding boxes
lazy-recomputed. Sleeping objects however, and static ones, don't have their
bounds recomputed all over in vain.

Pierre