Fixes 07 (#97)

#84 
#82 
Added B3_RESTITUTION_ITERATIONS to override restitution iterations.
Fix regression in hull stacking stability.
This commit is contained in:
Erin Catto 2026-07-20 22:05:11 -07:00 • committed by GitHub
commit 23861418d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 877 additions and 448 deletions

View file

@ -1558,7 +1558,7 @@ void b3WarmStartContacts_Convex( b3SolverBlock block, b3StepContext* context )
int pointCount1 = b3MaxInt( c->pointCounts[0], c->pointCounts[1] );
int pointCount2 = b3MaxInt( c->pointCounts[2], c->pointCounts[3] );
int pointCount = b3MaxInt( pointCount1, pointCount2 );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_SIMD_WIDTH );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_MAX_MANIFOLD_POINTS );
// Normal impulses
for ( int j = 0; j < pointCount; ++j )
@ -1632,7 +1632,7 @@ void b3SolveContacts_Convex( b3SolverBlock block, b3StepContext* context, bool u
int pointCount1 = b3MaxInt( c->pointCounts[0], c->pointCounts[1] );
int pointCount2 = b3MaxInt( c->pointCounts[2], c->pointCounts[3] );
int pointCount = b3MaxInt( pointCount1, pointCount2 );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_SIMD_WIDTH );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_MAX_MANIFOLD_POINTS );
b3BodyStateW bA = b3GatherBodies( states, c->indexA );
b3BodyStateW bB = b3GatherBodies( states, c->indexB );
@ -1847,7 +1847,7 @@ void b3ApplyRestitution_Convex( b3SolverBlock block, b3StepContext* context )
int pointCount1 = b3MaxInt( c->pointCounts[0], c->pointCounts[1] );
int pointCount2 = b3MaxInt( c->pointCounts[2], c->pointCounts[3] );
int pointCount = b3MaxInt( pointCount1, pointCount2 );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_SIMD_WIDTH );
B3_VALIDATE( 0 < pointCount && pointCount <= B3_MAX_MANIFOLD_POINTS );
// Single gather for all manifolds
b3BodyStateW bA = b3GatherBodies( states, c->indexA );