math docs
    Preparing search index...

    Function intersectsOBB3

    • 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.

      Parameters

      • a: obb3.OBB3

        The first OBB

      • b: obb3.OBB3

        The second OBB

      • epsilon: number = EPSILON

        Squared-sine threshold below which near-parallel edge axes are skipped

      Returns boolean

      true if the OBBs intersect