Intersections & Collisions

Intersection testing:

Collision detection:






Primitives

Line (or ray):
    R(t) = O + Dt





Primitives

Sphere:
    ||P - C|| = r





Primitives

Triangle
    P0, P1, P2





Primitives

Axis-aligned bounding box (AABB):
    Xmin <= x <= Xmax
    Ymin <= y <= Ymax
    Zmin <= z <= Zmax





Primitives

Oriented bounding box (OBB):
    Bcenter
    Bu, Bv, Bw





Primitives

Plane:
    Ax + By + Cz + d = 0
      or
    N * P + d = 0





Rules of Thumb






Collision Detection

Techniques:






Math

Dot product facts:

V dot V = ||V||2


Dot product of V with a unit vector u is the length of the projection of V onto u






Functions






Libraries



I-Collide

V-Collide

Others (from DMOZ)

Creative Commons License
This document is by Dave Pape, and is released under a Creative Commons License.