Skip to content

Update Box3D to 9e5a4cd - #11

Merged
Miguel249 merged 1 commit into
mainfrom
upstream/box3d-9e5a4cd
Sep 23, 2026
Merged

Miguel249 merged 1 commit into
mainfrom
upstream/box3d-9e5a4cd

Conversation

@Miguel249

Copy link
Copy Markdown
Owner

Updates the Box3D submodule from 3fc20f5 to 9e5a4cd (v0.1.0-24, upstream CI green), regenerating the bindings and re-recording abi/native-layout.json (92 → 94 structs).

Box3D.NET (idiomatic), additive only — package validation against the last release reports no difference:

  • MeshOptions.ClockwiseWinding; CollisionMesh.FromTriangles<TVertex>(vertices, positionOffset, indices, ...) for interleaved vertex buffers
  • CharacterContact.TriangleIndex / ChildIndex / MaterialIndex
  • CharacterMover.TimeOfImpact → CharacterImpact
  • Joint.IsAwake; BodyDefinition.SafetyFactor / Body.SafetyFactor

Box3D.NET.Native, breaking where the C API broke (recorded in CompatibilitySuppressions.xml and the changelog): b3GetByteCount → long, allocator callbacks take size_t, dynamic tree rewrite, 64-bit geometry hashes, counter/profile fields. b3RecPlayer_Create/Destroy remain as [Obsolete] forwarders to the renamed functions.

Behaviour: shape casts now pass through the back of mesh and height field triangles (tests fail against the old Box3D, pass against the new). NaN contamination through the native layer no longer reaches untouched bodies; the fuzz test now measures contamination through contact.

Verified locally (win-x64): build 0 warnings, 365/365 tests, 16/16 samples, dotnet pack + verify-package.ps1 (framework-dependent, trimmed, NativeAOT), dump-abi -Check, api-coverage -Check, regenerated bindings identical; android-arm64/x64 native builds. Linux, macOS, iOS and win-arm64 are left to CI.

Version not bumped: recommend 0.5.0 in the release commit, moving the validation baseline to 0.4.0.

Box3D moves from 3fc20f5 to 9e5a4cd, the six upstream commits between
them. The bindings are regenerated, abi/native-layout.json is re-recorded
from the C compiler, and every changed struct mirror follows its header:
b3MeshDef gains a size_t stride and clockWiseWinding, b3PlaneResult gains
triangle, child and material indices, b3BodyTOIResult is new, the dynamic
tree is rewritten around 32-byte paired nodes and a separate proxy array,
and hulls, meshes and height fields carry 64-bit hashes.

The idiomatic layer only gains members, and package validation against
the last release reports no difference for it:

- MeshOptions.ClockwiseWinding, and CollisionMesh.FromTriangles<TVertex>
  for positions read out of an interleaved vertex buffer.
- CharacterContact.TriangleIndex, ChildIndex and MaterialIndex.
- CharacterMover.TimeOfImpact, for a moving body striking a character.
- Joint.IsAwake, and SafetyFactor on BodyDefinition and Body.

Box3D.NET.Native breaks where the C declarations broke: b3GetByteCount
returns int64, the allocator callbacks take size_t, and the tree, hash,
counter and profile fields moved. These are recorded in
CompatibilitySuppressions.xml. b3RecPlayer_Create and _Destroy were pure
renames upstream, so the old names stay as obsolete forwarders.

Shape casts now pass through the back of mesh and height field triangles,
as ray casts always have. The tests that pin this fail against the
previous Box3D. A NaN smuggled in through the native layer no longer
reaches bodies it is not touching, so the fuzz test that justifies the
validation now measures contamination through contact instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Miguel249
Miguel249 merged commit 51c4a94 into main Sep 23, 2026
23 checks passed
@Miguel249
Miguel249 deleted the upstream/box3d-9e5a4cd branch September 23, 2026 19:27
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