Port box3d dfa5e6a: Fixing issues (#94)#6
Merged
Conversation
…isions, void DrawShapeFcn Ports upstream dfa5e6add08be96aa1380220aff769b6816d1f69 "Fixing issues (#94)" (erincatto/box3d), re-expressed in Q48.16 fixed point where needed. Engine: - contact.c: compound child contacts feed the STRUCK child's material to the mixing callbacks (was material table entry 0). Regression TestCompoundContactMaterials, verified red pre-fix. - triangle_manifold.c: hull-face admission vs triangle loosened to faceQueryB.separation >= faceQueryA.separation (linearSlop bias dropped) to reduce ghost collisions. Goldens regenerated for both builds: WavePile 0xB2784280 narrow / 0x95D6FBC0 ludicrous, MeshDrop 0x777F3CB6 / 0xEE4D0F7A; sleep steps, ragdoll, and QuerySpawn all carried unchanged. - types.h: b3SurfaceMaterial gains explicit uint32_t padding (compound.c asserts sizeof == 64 in fixed point — upstream asserts 40 — plus padding == 0 in hash/compare); DrawShapeFcn returns void; drawAnchorA bool. - B3_ENABLE_ASSERT genexp moved out of the MSVC block (all RelWithDebInfo builds carry live asserts); mingw CI job Debug -> RelWithDebInfo; mingw CMake presets added. Samples: - CharacterMover extracted to mover.h/mover.cpp with upstream's behavior fixes in fixed point: stop clause zeroes x/z (not x/y), friction scales horizontal components only, pogo suppressed while moving up, forward normalized after flattening. - Kinematic transparency option (SetTransparentKinematic, Transparency menu). - New "GMod Wheel Stack" issues sample (verts B3_FIX-wrapped, hull creation null-guarded). TriangleAndHull scenario updated to upstream's new repro. Already satisfied: the contact_solver.c per-lane pointCounts change — our maxPointCount wide-constraint field has bounded those loops since the c37cfe4-era Round 2 work. Not ported: the README MinGW line (the slimmed README has no presets section). Verified: all 22 suites in Release and Debug+VALIDATE+ASan/UBSan, narrow AND ludicrous; conversion_audit.py clean (103 TUs); headless sample smoke exit 0.
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.
Ports upstream commit dfa5e6add08be96aa1380220aff769b6816d1f69 — "Fixing issues (#94)" (erincatto/box3d) — re-expressed in Q48.16 fixed point where needed.
Engine changes
b3UpdateContactnow feeds the struck child's material to the friction/restitution mixing callbacks instead of material table entry 0. New regressionTestCompoundContactMaterials(sphere/capsule/hull children), verified red pre-fix.faceQueryB.separation >= faceQueryA.separation(thelinearSlopbias is gone). This is the one solver-affecting change — determinism goldens regenerated for both builds (WavePile0xB2784280narrow /0x95D6FBC0ludicrous, MeshDrop0x777F3CB6/0xEE4D0F7A; all sleep steps, the ragdoll goldens, and QuerySpawn carried over unchanged — only hull-on-mesh scenes move).b3SurfaceMaterialgains the explicituint32_t paddingfield; compound.c assertssizeof == 64(fixed-point layout; upstream asserts 40) andpadding == 0in the dedup hash/compare.b3StageMaterialkeeps staging, so the invariant holds by construction.b3DebugDraw.DrawShapeFcnreturnsvoid;drawAnchorAisbool.B3_ENABLE_ASSERTfor RelWithDebInfo applies to all compilers (was MSVC-only); the mingw CI job moves Debug → RelWithDebInfo; mingw CMake presets added.Samples
CharacterMoverextracted tomover.h/mover.cppwith upstream's behavior fixes in fixed point (stop clause zeroes x/z, friction scales horizontal components only, pogo suppressed while airborne-up, forward normalized).SetTransparentKinematicreplacesGetTransparentDynamic.Deliberate deviations
pointCounts+ max-point solver loops — Fixed3D'smaxPointCountwide-constraint field has bounded warm start/solve/restitution since the c37cfe4-era Round 2 work.Verification
conversion_audit.pyclean across all 103 TUs.