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

@ -102,10 +102,13 @@ B3_INLINE b3Vec3 RandomUnitVector()
float sqrt1MinusU1 = sqrtf( 1.0f - u1 );
float sqrtU1 = sqrtf( u1 );
b3CosSin cs2 = b3ComputeCosSin( u2 );
b3CosSin cs3 = b3ComputeCosSin( u3 );
b3Vec3 v;
v.x = sqrt1MinusU1 * sinf( u2 );
v.y = sqrt1MinusU1 * cosf( u2 );
v.z = sqrtU1 * sinf( u3 );
v.x = sqrt1MinusU1 * cs2.sine;
v.y = sqrt1MinusU1 * cs2.cosine;
v.z = sqrtU1 * cs3.sine;
return v;
}
@ -122,11 +125,14 @@ B3_INLINE b3Quat RandomQuat()
float sqrt1MinusU1 = sqrtf( 1.0f - u1 );
float sqrtU1 = sqrtf( u1 );
b3CosSin cs2 = b3ComputeCosSin( u2 );
b3CosSin cs3 = b3ComputeCosSin( u3 );
b3Quat q;
q.v.x = sqrt1MinusU1 * sinf( u2 );
q.v.y = sqrt1MinusU1 * cosf( u2 );
q.v.z = sqrtU1 * sinf( u3 );
q.s = sqrtU1 * cosf( u3 );
q.v.x = sqrt1MinusU1 * cs2.sine;
q.v.y = sqrt1MinusU1 * cs2.cosine;
q.v.z = sqrtU1 * cs3.sine;
q.s = sqrtU1 * cs3.cosine;
return q;
}