Game Engine Architecture

(Ben Green) #1

610 12. Collision and Rigid Body Dynamics


12.3.4.4. Oriented Bounding Boxes
If we permit an axis-aligned box to rotate relative to its coordinate system,
we have what is known as an oriented bounding box (OBB). It is oft en repre-
sented by three half-dimensions (half-width, half-depth, and half-height) and
a transformation, which positions the center of the box and defi nes its orien-
tation relative to the coordinate axes. Oriented boxes are a commonly used
collision primitive because they do a bett er job at fi tt ing arbitrarily oriented
objects, yet their representation is still quite simple.
12.3.4.5. Discrete Oriented Polytopes (DOP)
A discrete oriented polytope (DOP ) is a more-general case of the AABB and
OBB. It is a convex polytope that approximates the shape of an object. A DOP
can be constructed by taking a number of planes at infi nity and sliding them
along their normal vectors until they come into contact with the object whose
shape is to be approximated. An AABB is a 6-DOP in which the plane normals
are taken parallel to the coordinate axes. An OBB is also a 6-DOP in which
the plane normals are parallel to the object’s natural principal axes. A k-DOP
is constructed from an arbitrary number of planes k. A common method of
constructing a DOP is to start with an OBB for the object in question and then
bevel the edges and/or corners at 45 degrees with additional planes in an at-
tempt to yield a tighter fi t. An example of a k-DOP is shown in Figure 12.5.

y

x

y

x
Figure 12.4. An AABB is only a good approximation to a box-shaped object when the object’s
principal axes are roughly aligned with the coorindate system’s axes.

Figure 12.5. An OBB that has been beveled on all eight corners is known as a 14-DOP.
Free download pdf