Home

OBBs

An oriented bounding box (OBB) is a bounding volume that can be rotated with respect to a fixed world coordinate system. Unlike an axis-aligned bounding box (AABB), an OBB is defined by its center, three mutually orthogonal local axes, and three half-extents along those axes. In 3D, this yields a box rotated arbitrarily in space; in 2D, two axes and two extents define a rotated rectangle. OBBs are commonly used in computer graphics, collision detection, physics engines, and visibility tests because they can tightly fit objects with arbitrary orientation compared to AABBs.

With a 3D OBB, the center is c, the axes are unit vectors u0, u1, u2 forming

Collision tests between OBBs commonly use the separating axis theorem (SAT). For two 3D OBBs there are

OBBs can be constructed by fitting to a set of points (e.g., via principal component analysis or

an
orthonormal
basis,
and
the
half-extents
are
e0,
e1,
e2.
The
orientation
can
be
stored
as
a
rotation
matrix
whose
columns
are
the
axes,
or
as
a
quaternion.
An
OBB
can
be
transformed
from
local
space
to
world
space
by
rotating
with
the
matrix
and
translating
by
c;
the
local
coordinates
(x,
y,
z)
map
to
world
coordinates
as
x*u0
+
y*u1
+
z*u2
+
c.
15
candidate
axes:
the
three
axes
of
each
box
and
the
nine
cross
products.
Each
axis
is
used
to
project
the
boxes;
if
a
separating
gap
is
found
on
any
axis,
the
boxes
do
not
intersect.
To
improve
robustness,
a
small
epsilon
is
often
added
to
the
projection
terms.
Tests
for
OBB–AABB
or
OBB–sphere
are
special
cases
with
fewer
axes.
rotating
calipers)
or
by
aligning
with
an
object's
orientation.
They
are
used
in
broad-phase
collision
detection,
culling,
and
bounding-volume
hierarchies,
offering
a
tighter
fit
than
AABBs
while
keeping
computations
efficient.