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. Agrees with convex.collideConvexVsConvex on shallow contacts to within
floating point — it used to claim BIT-equivalence, but nothing tested that and the basis rewrite
below changes the last bits, so the weaker claim is the one that is actually known.
The frame transforms are written out in scalars against a rotation BASIS rather than rotating
vectors by the quaternion one at a time — the same composition jolt uses for a body transform
(Body::GetCenterOfMassTransform is Mat44::sRotationTranslation(rotation, position)). One
quaternion-to-basis conversion serves all four transforms, the inverse is the transpose, and
nothing round-trips through module scratch. The faces branch keeps its arrays — they feed
getShapeSupportingFace, and it only runs when faces were asked for.
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. Agrees with convex.collideConvexVsConvex on shallow contacts to within floating point — it used to claim BIT-equivalence, but nothing tested that and the basis rewrite below changes the last bits, so the weaker claim is the one that is actually known.
The frame transforms are written out in scalars against a rotation BASIS rather than rotating vectors by the quaternion one at a time — the same composition jolt uses for a body transform (
Body::GetCenterOfMassTransformisMat44::sRotationTranslation(rotation, position)). One quaternion-to-basis conversion serves all four transforms, the inverse is the transpose, and nothing round-trips through module scratch. The faces branch keeps its arrays — they feed getShapeSupportingFace, and it only runs when faces were asked for.