Collision Detection: Axis-Aligned Bounding Box (AABB) Quiz Quiz

Explore key principles and scenarios of Axis-Aligned Bounding Box (AABB) collision detection with this concise quiz. Gain a deeper understanding of overlap testing, performance considerations, and how AABBs are used in 2D and 3D computer graphics and games.

  1. Basic Overlap Test

    When checking if two AABBs overlap in a 2D space, which condition must be true along both the x and y axes?

    1. The center of one box must be inside the other box on both axes.
    2. Their areas must be exactly equal on both axes.
    3. The minimum of one box must be less than the minimum of the other on both axes.
    4. The maximum of one box must be greater than or equal to the minimum of the other and vice versa on both axes.

    Explanation: To detect AABB overlap, you check that, along each axis, the maximum coordinate of one box is greater than or equal to the minimum coordinate of the other box and vice versa; otherwise, the boxes do not overlap. The distractor about centers is incorrect, as center containment is not required. Areas being equal is irrelevant, as overlap does not depend on equal size. The minimum-to-minimum comparison does not account for the actual boundaries, so it is not correct.

  2. 3D AABB Application

    In which scenario is Axis-Aligned Bounding Box (AABB) collision detection most efficient compared to other bounding volumes like spheres or oriented bounding boxes?

    1. When objects are aligned with the primary axes and require quick rejection tests.
    2. When collision detection must be independent of coordinate axes.
    3. When precise collision boundaries are needed around circular objects.
    4. When objects are frequently rotated and have irregular shapes.

    Explanation: AABBs perform best when objects do not rotate frequently and are axis-aligned, as their overlap checks are fast and simple. Spheres better fit round objects and oriented bounding boxes handle rotated cases more accurately, so those options are less suitable. Precise detection around circular shapes and coordinate-axis independence are areas where AABBs may be less optimal.

  3. AABB vs. Oriented Bounding Box (OBB)

    Why can AABBs generate more false positives in collision detection than Oriented Bounding Boxes (OBBs) for non-axis-aligned objects?

    1. AABBs are always smaller than the objects they enclose.
    2. AABBs adjust their rotation to fit objects’ orientation.
    3. AABBs encompass more empty space when objects are not aligned with the axes.
    4. AABBs are defined only by a single point, unlike OBBs.

    Explanation: AABBs always align with the primary axes, so non-aligned or rotated objects cause the AABB to include excess empty space, leading to more false positives. The statement that AABBs are always smaller is false—they are often larger in these cases. AABBs do not rotate to match object orientation. Defining AABBs by a single point is incorrect; they use minimum and maximum bounds.

  4. Performance Considerations

    What is a significant advantage of using AABBs in large-scale scene collision detection, such as in games or simulations?

    1. AABBs are ideal for detecting collisions among curved shapes only.
    2. AABBs store the full polygonal detail of objects.
    3. AABBs provide very fast overlap checks using simple comparisons.
    4. AABBs do not require updates when objects move or scale.

    Explanation: The main advantage of AABBs is their fast overlap detection, using only a few comparisons per axis, which improves performance in large scenes. They do not store detailed shapes, so that distractor is wrong. While AABBs can be used with curved objects, they are not optimized solely for curved shapes. Importantly, AABBs often require updates when objects move or change size, contrary to the last option.

  5. AABB in 2D Games

    Suppose two rectangles in a 2D platform game are represented as AABBs. If there is no overlap on the x-axis but there is overlap on the y-axis, what can you conclude about their collision status?

    1. The rectangles must collide if they touch at any edge.
    2. The rectangles do not collide, because both axes must overlap for a collision.
    3. The rectangles always collide as long as one axis overlaps.
    4. The rectangles collide only if their areas are equal.

    Explanation: Collision of AABBs in 2D requires overlap on both the x and y axes; without overlap along one axis, the rectangles cannot collide. Overlapping on just one axis is not sufficient, so the second option is false. Edge-touching without overlap does not guarantee collision. Area equality is unrelated to the presence or absence of collision.