Reduce ghosts (#212)

Full ghost collision handling for sphere, capsule, and hull versus a
single mesh or heightfield. This requires mesh to be built with edge
identification.

Optimized mesh builder.

Removed B3_MAX_MESH_CONTACT_TRIANGLES. You will still hit performance
problems for dense meshes. Fixes #184
This commit is contained in:
Erin Catto 2026-11-10 21:53:10 -08:00 • committed by GitHub
commit 38f2ae1e19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 17756 additions and 1492 deletions

View file

@ -39,6 +39,12 @@ MeshHandle FindOrAddHull( const b3HullData* hull );
// draw time. Two b3Mesh sharing the same b3MeshData share one entry.
MeshHandle FindOrAddMesh( const b3MeshData* meshData );
// Acquire the subset of a mesh whose triangles sit in a material slot with a
// nonzero slotMask entry. Keyed by the mesh hash mixed with the mask, so shapes
// sharing a mesh and a slot grouping share one entry. Falls back to the whole
// mesh when the mesh carries no material indices.
MeshHandle FindOrAddMeshSubset( const b3MeshData* meshData, const uint8_t* slotMask, int slotCount );
// Acquire for b3HeightFieldData. The `scale` vector is part of the height
// field's hash (folded into construction), so two heightfields with
// different scales hash to different entries, per-instance scale stays