Analytical sphere vs box collision. A is the sphere, B is the box.
Closed-form clamp of the sphere centre to the box's shrunk core (half-extents minus convex
radius, mirroring setBoxSupport EXCLUDE_CONVEX_RADIUS), with the combined radius handling the
rounded shell. Skips GJK/EPA entirely; the deep (centre-inside-core) case degrades to a per-axis
SAT scan rather than EPA. Bit-equivalent to convex.collideConvexVsConvex on shallow contacts.
The mathcat frame transforms are written idiomatically; compilecat's @optimize (flatten +
SROA) inlines the vec3/quat calls and localises the literal-initialised scratch, so the hot
path compiles to straight-line scalar arithmetic with no module-array round-trips or calls.
(The faces branch keeps its scratch arrays — they feed the un-inlined getShapeSupportingFace.)
Analytical sphere vs box collision. A is the sphere, B is the box.
Closed-form clamp of the sphere centre to the box's shrunk core (half-extents minus convex radius, mirroring setBoxSupport EXCLUDE_CONVEX_RADIUS), with the combined radius handling the rounded shell. Skips GJK/EPA entirely; the deep (centre-inside-core) case degrades to a per-axis SAT scan rather than EPA. Bit-equivalent to convex.collideConvexVsConvex on shallow contacts.
The mathcat frame transforms are written idiomatically; compilecat's
@optimize(flatten + SROA) inlines the vec3/quat calls and localises the literal-initialised scratch, so the hot path compiles to straight-line scalar arithmetic with no module-array round-trips or calls. (The faces branch keeps its scratch arrays — they feed the un-inlined getShapeSupportingFace.)