15.3 Linear Component and Oriented Box 691
rhs = box.e[0] * AWdU[1] + box.e[1] * AWdU[0];
if (AWxDdU[2] > rhs)
{
return false;
}
return true;
}
Segments and OBBs
The semi-infinite convex polyhedron that corresponds to the Minkowski difference of
a ray and an OBB becomes a finite object in the case of a segment and an OBB. Figure
15.4 illustrates in two dimensions. The infinite convex polyhedron has the same three
pairs of parallel faces as for the ray and line, but the polyhedron has the OBB as an
end cap on both ends of the segment. The OBB contributes three additional faces and
corresponding normal vectors, a total of six potential separating axes. The separation
tests are
|U
0
.
D ×
| >e
1
|D
.
U
2
|+e
2
|D
.
U
1
|
|U
1
.
D ×
| >e
0
|D
.
U
2
|+e
2
|D
.
U
0
|
|U
2
.
D ×
| >e
0
|D
.
U