Graphics Reference
In-Depth Information
Chapter 4
Bounding Volumes
Directly testing the geometry of two objects for collision against each other is often
very expensive, especially when objects consist of hundreds or even thousands of
polygons. To minimize this cost, object bounding volumes are usually tested for
overlap before the geometry intersection test is performed.
A bounding volume (BV) is a single simple volume encapsulating one or more
objects of more complex nature. The idea is for the simpler volumes (such as boxes
and spheres) to have cheaper overlap tests than the complex objects they bound.
Using bounding volumes allows for fast overlap rejection tests because one need
only test against the complex bounded geometry when the initial overlap query for
the bounding volumes gives a positive result (Figure 4.1).
Of course, when the objects really do overlap, this additional test results in an
increase in computation time. However, in most situations few objects are typically
close enough for their bounding volumes to overlap. Therefore, the use of bounding
volumes generally results in a significant performance gain, and the elimination of
complex objects from further tests well justifies the small additional cost associated
with the bounding volume test.
For some applications, the bounding volume intersection test itself serves as a
sufficient proof of collision. Where it does not, it is still generally worthwhile pruning
the contained objects so as to limit further tests to the polygons contained in the
overlap of the bounding volumes. Testing the polygons of an object A against the
polygons of an object B typically has an O ( n 2 ) complexity. Therefore, if the number of
polygons to be tested can be, say, cut in half, the workload will be reduced by 75%.
Chapter 6, on bounding volume hierarchies, provides more detail on how to prune
object and polygon testing to a minimum. In this chapter, the discussion is limited
to tests of pairs of bounding volumes. Furthermore, the tests presented here are
primarily homogeneous in that bounding volumes of the same type are tested against
each other. It is not uncommon, however, to use several types of bounding volumes
at the same time. Several nonhomogeneous BV intersection tests are discussed in the
next chapter.
75
Search WWH ::




Custom Search