Tests whether an OBB intersects with another OBB using the Separating Axis Theorem.
Reference: OBB-OBB Intersection in Real-Time Collision Detection
by Christer Ericson (chapter 4.4.1)
A cross-product axis A_i x B_j degenerates to ~zero when those edges are near
parallel, which makes its (un-normalised) separation test numerically unstable.
Such an axis carries no separation information not already covered by the face
axes, so it is skipped when 1 - R[i][j]^2 (its squared length, = sin^2 of the
angle between the edges) falls below epsilon. This is scale-invariant — R is a
matrix of cosines — unlike fudging the projected radii.
Tests whether an OBB intersects with another OBB using the Separating Axis Theorem. Reference: OBB-OBB Intersection in Real-Time Collision Detection by Christer Ericson (chapter 4.4.1)
A cross-product axis A_i x B_j degenerates to ~zero when those edges are near parallel, which makes its (un-normalised) separation test numerically unstable. Such an axis carries no separation information not already covered by the face axes, so it is skipped when
1 - R[i][j]^2(its squared length, = sin^2 of the angle between the edges) falls belowepsilon. This is scale-invariant — R is a matrix of cosines — unlike fudging the projected radii.