Axis Aligned Bounding Box

An Axis Aligned Bounding Box (AABB) is the 3D version of a rectangle. We will define a 3D AABB by a center point (position) and a half extent (size). The half extent of an Axis Aligned Bounding box represents half of the width, height and depth of the box. For example a box with half extents of (2, 3, 4) would be four units wide, six units tall and eight units deep.

Axis Aligned Bounding Box

Getting ready

We are going to create a new AABB structure, which will contain an origin and half extents. It's helpful to be able to get the minimum and maximum points of an AABB. We are going to implement helper functions to get both the min and max point of ...

Get Game Physics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.