Skip to main content

Module collision

Module collision 

Source
Expand description

Collision detection for 2D polygons.

§Algorithms

  • SAT (Separating Axis Theorem): Exact overlap test for convex polygons. For concave polygons, it tests the convex hull approximation.
  • AABB broad phase: Fast rejection using bounding boxes.

§References

  • Ericson (2005), “Real-Time Collision Detection”, Ch. 4.4
  • Gottschalk, Lin, Manocha (1996), “OBB-Tree: A Hierarchical Structure for Rapid Interference Detection”

Functions§

aabb3_overlap
Checks if two 3D AABBs overlap.
aabb3_overlap_with_tolerance
Checks if two 3D AABBs overlap with a tolerance margin.
aabb3_within
Checks if a 3D AABB is fully contained within a boundary AABB.
aabb3_within_with_margin
Checks if a 3D AABB fits within a boundary with a margin.
aabb_overlap
Checks if two AABBs overlap (broad-phase test).
overlap_depth
Computes the overlap depth (penetration) between two convex polygons.
polygons_overlap
Checks if two convex polygons overlap using the Separating Axis Theorem.
polygons_overlap_with_tolerance
SAT overlap test with configurable tolerance.