Bounding volume
In computer graphics and computational geometry, a bounding volume (or bounding region) for a set of objects is a closed region that completely contains the union of the objects in the set.Bounding volumes are used to improve the efficiency of geometrical operations, such as by using simple regions, having simpler ways to test for overlap.Therefore, it is possible to confine the description to the case of a single object, which is assumed to be non-empty and bounded (finite).Similarly if the frustum contains the entirety of the bounding volume, the contents may be trivially accepted without further tests.In collision detection, when two bounding volumes do not intersect, the contained objects cannot collide.In either case, it is computationally wasteful to test each polygon against the view volume if the object is not visible.[1] In computer stereo vision, a bounding volume reconstructed from silhouettes of an object is known as a "visual hull."[2] The choice of the type of bounding volume for a given application is determined by a variety of factors: the computational cost of computing a bounding volume for an object, the cost of updating it in applications in which the objects can move or change shape or size, the cost of determining intersections, and the desired precision of the intersection test.Sophisticated bounding volumes generally allow for less void space but are more computationally expensive.Unfortunately, intersection tests become quickly more expensive as the bounding boxes become more sophisticated.A minimum bounding rectangle (MBR) – the least AABB in 2-D – is frequently used in the description of geographic (or "geospatial") data items, serving as a simplified proxy for a dataset's spatial extent (see geospatial metadata) for the purpose of data search (including spatial queries as applicable) and display.To distinguish the general case from an AABB, an arbitrary bounding box is sometimes called an oriented bounding box (OBB), or an OOBB when an existing object's local coordinate system is used.Cylinders are appropriate for 3-D objects that can only rotate about a vertical axis but not about other axes, and are otherwise constrained to move by translation only.They are very quick to test for collision with each other: two spheres intersect when the distance between their centres does not exceed the sum of their radii.If the object is the union of a finite set of points, its convex hull is a polytope.A discrete oriented polytope (DOP) generalizes the bounding box.Thus, a k-DOP is the Boolean intersection of k bounding slabs and is a convex polytope containing the object (in 2-D a polygon; in 3-D a polyhedron).For some types of bounding volume (OBB and convex polyhedra), an effective check is that of the separating axis theorem.This concept of determining non-intersection via use of axis projection also extends to convex polyhedra, however with the normals of each polyhedral face being used instead of the base axes, and with the extents being based on the minimum and maximum dot products of each vertex against the axes.The intersection of two k-DOP's can be computed very similarly to AABBs: for each orientation, you just check the two corresponding intervals of the two DOP's.