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 24<br />
bounding boxes become more sophisticated.<br />
A bounding sphere is a sphere containing the object. In 2-D <strong>graphics</strong>, this is a circle. Bounding spheres are<br />
represented by centre and radius. They are very quick to test for collision with each other: two spheres intersect<br />
when the distance between their centres does not exceed the sum of their radii. This makes bounding spheres<br />
appropriate for objects that can move in any number of dimensions.<br />
A bounding ellipsoid is an ellipsoid containing the object. Ellipsoids usually provide tighter fitting than a sphere.<br />
Intersections with ellipsoids are done by scaling the other object along the principal axes of the ellipsoid by an<br />
amount equal to the multiplicative inverse of the radii of the ellipsoid, thus reducing the problem to intersecting the<br />
scaled object with a unit sphere. Care should be taken to avoid problems if the applied scaling introduces skew.<br />
Skew can make the usage of ellipsoids impractical in certain cases, for example collision between two arbitrary<br />
ellipsoids.<br />
A bounding cylinder is a cylinder containing the object. In most applications the axis of the cylinder is aligned with<br />
the vertical direction of the scene. Cylinders are appropriate for 3-D objects that can only rotate about a vertical axis<br />
but not about other axes, and are otherwise constrained to move by translation only. Two vertical-axis-aligned<br />
cylinders intersect when, simultaneously, their projections on the vertical axis intersect – which are two line<br />
segments – as well their projections on the horizontal plane – two circular disks. Both are easy to test. In video<br />
games, bounding cylinders are often used as bounding volumes for people standing upright.<br />
A bounding capsule is a swept sphere (i.e. the volume that a sphere takes as it moves along a straight line segment)<br />
containing the object. Capsules can be represented by the radius of the swept sphere and the segment that the sphere<br />
is swept across). It has traits similar to a cylinder, but is easier to use, because the intersection test is simpler. A<br />
capsule and another object intersect if the distance between the capsule's defining segment and some feature of the<br />
other object is smaller than the capsule's radius. For example, two capsules intersect if the distance between the<br />
capsules' segments is smaller than the sum of their radii. This holds for arbitrarily rotated capsules, which is why<br />
they're more appealing than cylinders in practice.<br />
A bounding box is a cuboid, or in 2-D a rectangle, containing the object. In dynamical simulation, bounding boxes<br />
are preferred to other shapes of bounding volume such as bounding spheres or cylinders for objects that are roughly<br />
cuboid in shape when the intersection test needs to be fairly accurate. The benefit is obvious, for example, for objects<br />
that rest upon other, such as a car resting on the ground: a bounding sphere would show the car as possibly<br />
intersecting with the ground, which then would need to be rejected by a more expensive test of the actual model of<br />
the car; a bounding box immediately shows the car as not intersecting with the ground, saving the more expensive<br />
test.<br />
In many applications the bounding box is aligned with the axes of the co-ordinate system, and it is then known as an<br />
axis-aligned bounding box (AABB). To distinguish the general case from an AABB, an arbitrary bounding box is<br />
sometimes called an oriented bounding box (OBB). AABBs are much simpler to test for intersection than OBBs,<br />
but have the disadvantage that when the model is rotated they cannot be simply rotated with it, but need to be<br />
recomputed.<br />
A bounding slab is related to the AABB and used to speed up ray tracing [1]<br />
A minimum bounding rectangle or MBR – the least AABB in 2-D – is frequently used in the description of<br />
geographic (or "geospatial") data items, serving as a simplified proxy for a dataset's spatial extent (see geospatial<br />
metadata) for the purpose of data search (including spatial queries as applicable) and display. It is also a basic<br />
component of the R-tree method of spatial indexing.<br />
A discrete oriented polytope (DOP) generalizes the AABB. A DOP is a convex polytope containing the object (in<br />
2-D a polygon; in 3-D a polyhedron), constructed by taking a number of suitably oriented planes at infinity and<br />
moving them until they collide with the object. The DOP is then the convex polytope resulting from intersection of<br />
the half-spaces bounded by the planes. Popular choices for constructing DOPs in 3-D <strong>graphics</strong> include the