Tunnelling
Generated from engine/collision/tunnelling.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/collision/tunnelling.h" · namespace labrador
max_safe_displacement
Section titled “max_safe_displacement”A one-dimensional displacement budget for discrete collision detection. This is exact for fixed-size axis-aligned boxes translating along one shared coordinate axis, with strictly overlapping intervals on the other axis throughout the step. Extents are their positive widths or heights on the travel axis; displacement is a nonnegative relative travel distance and the step duration is positive.
Under those assumptions, the interval of travel with positive overlap has length extent_a + extent_b. A shorter step cannot cross it entirely. The boundary itself is unsafe: both sampled endpoints can merely touch, and narrow_phase.h treats touching as no contact.
Projecting arbitrary shapes onto a diagonal does NOT establish this interval. An off-center corner crossing can have an arbitrarily short contact interval despite large projected extents. For diagonal motion, rotation, or other geometry these helpers are only a tuning heuristic; a false can_tunnel result does not prove safety. Clients choosing the discrete model (PHILOSOPHY T3) must constrain their content and motion, or separately test the trajectories that matter.
can_tunnel
Section titled “can_tunnel”Whether the one-dimensional budget above is reached or exceeded. NaN displacement answers true. This does not test an actual trajectory.
max_safe_speed
Section titled “max_safe_speed” float seconds_per_step);The boundary speed under the same assumptions, in world units/second. A safe working speed is strictly less than this boundary.
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.
tests/collision/tunnelling_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.