SIMD hull collision (#93)

SIMD based hull collision inspired by example code from @cairnc in #54 

<img width="1676" height="1332" alt="image"
src="https://github.com/user-attachments/assets/58b137bd-bf7b-4c99-863c-64341b973a3d"
/>

- Fixed #78
- Fixed #85 and fixed CI to error on UB.
- Updated benchmarks
- Added AMD scalar benchmarks
- Added Neon benchmarks
- More determinism unit tests
- Sample leak detection
- Added b3Body_AllowFastRotation
- Added b3Body_IsFastRotationAllowed
- Bumped b3HullData version
- Bumped b3CompoundData version
This commit is contained in:
Erin Catto 2026-07-18 22:43:03 -07:00 • committed by GitHub
commit c37cfe4cd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 3898 additions and 1151 deletions

View file

@ -3,7 +3,6 @@
#include "benchmarks.h"
#include "overflow_color.h"
#include "stability.h"
#include "test_macros.h"
#include "box3d/box3d.h"
@ -659,47 +658,6 @@ static int TestSetWorkerCount( void )
return 0;
}
// This tests continuous collision and mesh contact stability
static int TestMeshDrop( void )
{
b3WorldDef worldDef = b3DefaultWorldDef();
// todo GetCoreCount
worldDef.workerCount = 4;
b3WorldId worldId = b3CreateWorld( &worldDef );
MeshDropData data = CreateMeshDrop( worldId, b3Pos_zero );
float timeStep = 1.0f / 60.0f;
int stepIndex = 0;
int stepLimit = 400;
while ( stepIndex < stepLimit )
{
int subStepCount = 4;
b3World_Step( worldId, timeStep, subStepCount );
b3BodyEvents events = b3World_GetBodyEvents( worldId );
if ( events.moveCount == 0 )
{
// All bodies sleeping
break;
}
stepIndex += 1;
}
printf( " TestMeshDrop stepIndex = %d\n", stepIndex );
DestroyMeshDrop( &data );
b3DestroyWorld( worldId );
ENSURE( stepIndex < stepLimit );
return 0;
}
// Verifies the b3*_Overflow solver path. The scene puts >B3_DYNAMIC_COLOR_COUNT
// dyn-dyn contacts on a single hub body so several land in the overflow color.
// The new Prepare/Store contactId-pairing asserts in contact_solver.c fire here
@ -1080,7 +1038,6 @@ int WorldTest( void )
RUN_SUBTEST( TestContactEvents );
RUN_SUBTEST( TestHitEvents );
RUN_SUBTEST( TestCompoundHitEvents );
RUN_SUBTEST( TestMeshDrop );
RUN_SUBTEST( TestOverflowColorPile );
RUN_SUBTEST( SetBulletDriftTest );
RUN_SUBTEST( EnableSleepFlagSyncTest );