Intersection testing:
Collision detection:
Line (or ray):
R(t) = O + Dt |
Sphere:
||P - C|| = r |
|
Triangle
P0, P1, P2 |
|
Axis-aligned bounding box (AABB):
Xmin <= x <= Xmax Ymin <= y <= Ymax Zmin <= z <= Zmax |
Oriented bounding box (OBB):
Bcenter Bu, Bv, Bw |
Plane:
Ax + By + Cz + d = 0 or N * P + d = 0 |
Techniques:
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