aephysics.hull: quickhull and the half-edge hull - #2
Merged
Merged
Conversation
Box3D's hull.c in Aether: the quickhull builder with per-face conflict lists and cached farthest points, the iterative horizon walk, the cone from the apex, the merging of flipped, concave and coplanar cone faces, and the packing into one block with the arrays at offsets. The builder's pointers are indices into its pools, with the intrusive lists chained through prev/next and their sentinels in extra slots. Half-edge indices are ints; the SOA mirrors for the SIMD support function are not kept; the box hull is a heap block destroyed like any hull; the hash is this engine's own. Also: the tessellated cylinder, cone and rock, clone and clone-and-transform (with the winding reversed under a mirroring scale), the analytic box hull with scale_box, support vertex and face, mass, bounds, the ray cast against the planes, extent, projected area, and the 2D hull (monotone chain) with weld and simplification. math gains the plane helpers, rotate_inertia, max_element_index, aabb_add_point and LINEAR_SLOP; core gains lsr32. test_hull.ae carries test_hull.c: 438 checks at the reference's tolerances, including the 512-point sphere stress at three caps and the 4,096-point merge churn. bench/hull.ae against bench/hull_box3d.c: the same hulls (6,554 vertices, 12,106 faces) at 1.6-2x the reference's time, recorded in bench/RESULTS.md.
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 fourth layer: Box3D's
hull.cin Aether, asaephysics.hull.prev/nextwith their sentinels in extra slots.scale_box; support vertex/face; mass, bounds, ray cast, extent, projected area; the 2D monotone-chain hull with weld and simplification.math: plane helpers,rotate_inertia,max_element_index,aabb_add_point,LINEAR_SLOP.core:lsr32.test_hull.ae: the reference'stest_hull.c, 438 checks at its tolerances (cube, tetrahedron, determinism, vertex cap, redundant input, clone, cylinder, sphere reduction, 512-point sphere stress at three caps, 4,096-point merge churn, degenerate input, transformed box geometry, 2D square / collinear / weld / order / simplify).bench/hull.aevsbench/hull_box3d.c: the same hulls come out (6,554 vertices, 12,106 faces on both); 1.6–2× the reference's time for the builder (doubles, indices, by-value structs), the box hull a heap block where theirs is a stack value. Load-time cost; recorded, not chased.Differences from the reference: int half-edge indices (no byte type), no SOA mirrors (the wide support function goes native later), the box hull is destroyed like any hull, the hash is this engine's own.
overlap_hull,shape_cast_hulland the mover collision wait for the distance (GJK) layer.