Skip to content

shape: the sphere, the capsule and the shape of any kind - #8

Merged
nicolas-maman merged 2 commits into
mainfrom
feat/shape
Sep 20, 2026
Merged

nicolas-maman merged 2 commits into
mainfrom
feat/shape

Conversation

@nicolas-maman

Copy link
Copy Markdown
Contributor

The tenth layer: Box3D's sphere.c, capsule.c and the geometric half of shape.c as aephysics.shape.

  • Sphere and capsule: mass (the capsule's cylinder-plus-caps with Steiner, turned onto its axis), bounds and swept bounds, ray casts in the closest-point forms (the capsule with the near-parallel fallback through the axial circle), shape casts, overlap, the mover's planes with the deep-overlap directions; the hull's mover.
  • Shape of any kind with the dispatch under a transform: compute_shape_aabb, compute_fat_shape_aabb, compute_swept_shape_aabb, get_shape_centroid, get_shape_area, get_shape_projected_area, compute_shape_mass, compute_shape_extent, ray_cast_shape, shape_cast_shape, overlap_shape, collide_mover, make_shape_proxy; Filter/QueryFilter with should_shapes_collide/should_query_collide. The compound kind is reserved for the next layer.
  • test_shape.ae: the reference's geometry subtests (the world-bound name and flag tests come with the dynamics) plus every kind under one transform through every query, and the filters. 440 checks. The far-origin table shows our doubles three orders under the reference's float floor, still hitting at ten million units.
  • bench/shape.ae vs bench/shape_box3d.c: identical hits and sums; sphere rays and masses at parity, capsule rays 0.8x, the mover 1.45x, the GJK cast and overlap with radii 2-2.5x (to profile, issue to follow). Recorded in bench/RESULTS.md.

aephysics.shape, Box3D's sphere.c, capsule.c and the geometric half of
shape.c in Aether: the sphere's and capsule's mass, bounds, ray casts
in the closest-point forms that keep their precision far from the
origin, shape casts, overlap and mover planes; the hull's mover; and
the Shape of any kind (sphere, capsule, hull, mesh, height field, the
compound reserved) with its dispatch under a transform: bounds, swept
and fat bounds, centroid, areas, mass, extent, ray and shape casts,
overlap, the mover's planes, the proxy; and the collision filters.

test_shape.ae: the reference's masses (sphere, analytic, translated,
rotated and transformed boxes, the capsule bracketed by hulls), bounds,
the sphere and capsule ray cases (hits, misses, clip, interior, graze,
side, oblique, caps, degenerate, near parallel), the overlap convention
across the solids, the far-origin precision, the cast through the
dispatch; plus every kind under one transform through every query, and
the filters. 440 checks. The name and flag tests need a world and come
with the dynamics.

bench/shape.ae against bench/shape_box3d.c: the same hits and sums on
every phase; sphere rays and masses at parity, capsule rays 0.8x, the
mover 1.45x, the GJK cast and overlap on proxies with radii 2-2.5x,
recorded to profile.
@nicolas-maman
nicolas-maman merged commit 95e856f into main Sep 20, 2026
1 check passed
@nicolas-maman
nicolas-maman deleted the feat/shape branch September 20, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant