i
i
i
i
i
i
i
i
16.18. Dynamic Intersection Testing 791
visible from the outside. Efficient dynamic sphere/object intersection tests
can be derived by using relative motion and the transformation of a moving
sphere into a ray by using Minkowski sums.
16.18.4 Dynamic Separating Axis Method
The separating axis test (SAT) on page 731 is very useful in testing convex
polyhedrons, e.g., boxes and triangles, against each other. This can be
extended quite easily to dynamic queries as well [124, 292, 315, 1131].
Remember that the SAT method tests a set of axes to see whether the
projections of the two objects onto these axes overlap. If all projections
on all axes overlap, then the objects overlap as well. The key to solving
the problem dynamically is to move the projected interval of the moving
object with a speed of (v · a)/(a · a) (see Equation A.17) on the axis,
a [124]. Again, if there is overlap on all tested axes, then the dynamic
objects overlap, otherwise they do not. See Figure 16.32 for an illustration
of the difference between the stationary SAT and the dynamic SAT.
Eberly [292], using an idea by Ron Levine, also computes the actual time
of intersection between A and B. This is done by computing times when
they just start to overlap, t
s
, and when they stop overlapping (because the
intervals have moved “through” each other), t
e
. The hit between A and
B occurs at the largest of all the t
s
s for all the axes. Likewise, the end
of overlapping occurs at the smallest of all the t
e
s. Optimizations include
detecting when the intervals are nonoverlapping at t = 0 and also moving
apart. Also, if at any time the largest t
s
is greater than the smallest t
e
,
then the objects do not overlap, and so the test is terminated. This is
similar to the ray/box intersection test in Section 16.7.1. Eberly has code
for a wide range of tests between convex polyhedra, including box/box,
triangle/box, and triangle/triangle.
Figure 16.32. Left: the stationary SAT illustrated for an axis a. A and B do not overlap
on this axis. Right: the dynamic SAT illustrated. A moves and the projection of its
interval on a is tracked during the movement. Here, the two objects overlap on axis a.