유니티에서 AABB (Axis-Aligned Bounding Box) ?
ChatGPT4 에게 물어보았다.
An axis-aligned bounding box (AABB) is a geometric shape commonly used in computer graphics and physics simulations. Here’s what you need to know:
- Definition: An AABB is a box aligned with the coordinate axes (X, Y, and Z) and fully enclosing some object. Because the box is never rotated with respect to the axes, it can be defined by just its center and extents or alternatively by its minimum and maximum points.
In Unity, the Bounds struct represents an AABB. It is used by various components such as Collider.bounds, Mesh.bounds, and Renderer.bounds to define the bounding volume of objects in the scene1. Similarly, in Unity Physics, the Aabb struct serves the same purpose, allowing efficient collision detection and containment checks23.
Think of an AABB as a “bounding box” that wraps around an object, ensuring that no matter how the object rotates or moves, the box remains aligned with the coordinate axes. This makes it useful for collision detection, culling, and other spatial queries in games and simulations