aephysics.manifold: contact manifolds for spheres, capsules and hulls - #4
Merged
Merged
Conversation
Box3D's manifold.c and convex_manifold.c in Aether: the separating axis test over two hulls (A's faces, B's faces, the edge pairs whose Gauss-map arcs cross, the reference's scalar path exactly), the SAT cache that answers when the last axis still separates or still builds the same contact, the incident face from the closest vertex, Sutherland-Hodgman clipping to the reference face's side planes with feature pairs on every point, the reduction to four points with the reference's tie-break, the face contact by preference and the edge contact when the face finds nothing or the edge axis is clearly better; and the sphere-sphere, capsule-sphere, hull-sphere (GJK shallow, deepest face deep), capsule-capsule (two points when parallel) and hull-capsule (GJK shallow with the segment clipped to the support face; face and edge axes deep) colliders. The clip buffers are module scratch until the parallel layer gives each worker its own. test_manifold.ae: 43,090 checks from test_sat.c (the axis against a brute-force oracle over 7,000 random box pairs, offset hulls included) and the hull, sphere and capsule parts of test_manifold.c (crossed edges into deep overlap, the edge cache, the endpoint, parallel edges at the noise floor, overlap never empty, the ridge-crossing policy, the edge axis oracles, the capsule through an edge, the sphere and capsule seams, the capsule's deep face contact). On the way: aether#2119, an array literal of float expressions is typed as int. bench/manifold.ae against bench/manifold_box3d.c: the same manifolds (point counts, cache hits and separation sums equal on every phase); warm-cache hull-hull at parity, cold SAT 1.6x, capsule and sphere 1.5x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sixth layer: Box3D's
manifold.c+convex_manifold.cin Aether, asaephysics.manifold.test_manifold.ae: 43,090 checks —test_sat.c's brute-force oracle over 7,000 random box pairs (offset hulls included) and the hull/sphere/capsule parts oftest_manifold.c. The triangle parts wait for the triangle manifold.bench/manifold.aevsbench/manifold_box3d.c: identical manifolds (point counts, cache hits, separation sums equal on every phase). Warm-cache hull–hull at parity (3.7 vs 3.6 ms / 20k); cold SAT 1.6× (theirs is SIMD); capsule and sphere 1.5×.0.18 * math.PI) is silently typed as int.Differences: clip buffers are module scratch (one collision at a time until the parallel layer); the 4-point reduction is the reference's default variant.