3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Bounding volume 25<br />
axis-aligned bounding box, made from 6 axis-aligned planes, and the beveled bounding box, made from 10 (if<br />
beveled only on vertical edges, say) 18 (if beveled on all edges), or 26 planes (if beveled on all edges and corners). A<br />
DOP constructed from k planes is called a k-DOP; the actual number of faces can be less than k, since some can<br />
become degenerate, shrunk to an edge or a vertex.<br />
A convex hull is the smallest convex volume containing the object. If the object is the union of a finite set of points,<br />
its convex hull is a polytope.<br />
Basic intersection checks<br />
For some types of bounding volume (OBB and convex polyhedra), an effective check is that of the separating axis<br />
theorem. The idea here is that, if there exists an axis by which the objects do not overlap, then the objects do not<br />
intersect. Usually the axes checked are those of the basic axes for the volumes (the unit axes in the case of an AABB,<br />
or the 3 base axes from each OBB in the case of OBBs). Often, this is followed by also checking the cross-products<br />
of the previous axes (one axis from each object).<br />
In the case of an AABB, this tests becomes a simple set of overlap tests in terms of the unit axes. For an AABB<br />
defined by M,N against one defined by O,P they do not intersect if (M x >P x ) or (O x >N x ) or (M y >P y ) or (O y >N y ) or<br />
(M z >P z ) or (O z >N z ).<br />
An AABB can also be projected along an axis, for example, if it has edges of length L and is centered at C, and is<br />
being projected along the axis N:<br />
, and or , and<br />
where m and n are the minimum and maximum extents.<br />
An OBB is similar in this respect, but is slightly more complicated. For an OBB with L and C as above, and with I, J,<br />
and K as the OBB's base axes, then:<br />
For the ranges m,n and o,p it can be said that they do not intersect if m>p or o>n. Thus, by projecting the ranges of 2<br />
OBBs along the I, J, and K axes of each OBB, and checking for non-intersection, it is possible to detect<br />
non-intersection. By additionally checking along the cross products of these axes (I 0 ×I 1 , I 0 ×J 1 , ...) one can be more<br />
certain that intersection is impossible.<br />
This concept of determining non-intersection via use of axis projection also extends to convex polyhedra, however<br />
with the normals of each polyhedral face being used instead of the base axes, and with the extents being based on the<br />
minimum and maximum dot products of each vertex against the axes. Note that this description assumes the checks<br />
are being done in world space.<br />
References<br />
[1] POV-Ray Documentation (http:/ / www. povray. org/ documentation/ view/ 3. 6. 1/ 323/ )<br />
External links<br />
• Illustration of several DOPs for the same model, from epicgames.com (http:/ / udn. epicgames. com/ Two/ rsrc/<br />
Two/ CollisionTutorial/ kdop_sizes. jpg)