Intersection tests
Generated from engine/math/intersects.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/math/intersects.h" · namespace mattmath
The pairwise intersection vocabulary: every shape in this module against every other, as free functions.
EVERY ONE OF THESE BELONGS HERE, AT WHATEVER CALL COUNT. The count of callers is not the question; what a game does when it needs one of these is. A 2D engine whose client has to ask whether a segment crosses a rotated rectangle, and write the answer itself, has pushed geometry across the boundary (PHILOSOPHY, The boundary) - the game would be supplying mechanism, and a second definition of engine arithmetic would live outside the engine's tests, where the degenerate cases are not checked. Every one of these is a predicate a 2D game can reasonably want.
The collision module does not call these. narrow_phase measures a pair - an axis and a depth - rather than answering yes or no, and builds its own polygons and runs its own separating-axis test to do it.
No rectangles_intersect here: RectangleF::intersects(const RectangleF&) is that predicate.
rectangle_circle_intersect
Section titled “rectangle_circle_intersect”rectangle_circle_intersect
Section titled “rectangle_circle_intersect”rectangle_triangle_intersect
Section titled “rectangle_triangle_intersect”rectangle_quad_intersect
Section titled “rectangle_quad_intersect”rectangle_segment_intersect
Section titled “rectangle_segment_intersect”rectangle_point_intersect
Section titled “rectangle_point_intersect” const mattmath::Point2F& point);rectangle_rotated_rectangle_intersect
Section titled “rectangle_rotated_rectangle_intersect”circles_intersect
Section titled “circles_intersect” const mattmath::Circle& b);circle_triangle_intersect
Section titled “circle_triangle_intersect”circle_triangle_intersect
Section titled “circle_triangle_intersect”circle_quad_intersect
Section titled “circle_quad_intersect”circle_segment_intersect
Section titled “circle_segment_intersect”circle_segment_intersect
Section titled “circle_segment_intersect”circle_point_intersect
Section titled “circle_point_intersect” const mattmath::Point2F& point);circle_rectangle_rotated_intersect
Section titled “circle_rectangle_rotated_intersect”triangles_intersect
Section titled “triangles_intersect” const mattmath::Triangle& b);triangle_quad_intersect
Section titled “triangle_quad_intersect”triangle_segment_intersect
Section titled “triangle_segment_intersect”triangle_point_intersect
Section titled “triangle_point_intersect” const mattmath::Point2F& point);triangle_rectangle_rotated_intersect
Section titled “triangle_rectangle_rotated_intersect”quads_intersect
Section titled “quads_intersect”quad_segment_intersect
Section titled “quad_segment_intersect”quad_point_intersect
Section titled “quad_point_intersect” const mattmath::Point2F& point);quad_rectangle_rotated_intersect
Section titled “quad_rectangle_rotated_intersect”segments_intersect
Section titled “segments_intersect” float& t, mattmath::Point2F& p);segments_intersect
Section titled “segments_intersect”segment_rectangle_rotated_intersect
Section titled “segment_rectangle_rotated_intersect”point_rectangle_rotated_intersect
Section titled “point_rectangle_rotated_intersect”rectangles_rotated_intersect
Section titled “rectangles_rotated_intersect” const mattmath::RectangleRotated& b);Related types
Section titled “Related types”Named in the public declarations above: Circle, Quad, RectangleF, RectangleRotated, Segment, Triangle.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.