Optimizations (#168)

- Optimize contact prepare
- Back to post restitution stage
- Optimize solver math
- Bug fixes
This commit is contained in:
Erin Catto 2026-09-24 12:21:17 -07:00 • committed by GitHub
commit 79fc55976a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 3248 additions and 1519 deletions

View file

@ -76,6 +76,7 @@ typedef enum b3SolverStageType
b3_stageSolve,
b3_stageIntegratePositions,
b3_stageRelax,
b3_stageRestitution,
b3_stageStoreWideImpulses,
b3_stageStoreImpulses,
} b3SolverStageType;
@ -188,7 +189,6 @@ typedef struct b3StepContext
b3Softness contactSoftness;
b3Softness staticSoftness;
float restitutionThreshold;
float maxLinearVelocity;
struct b3World* world;
@ -208,6 +208,8 @@ typedef struct b3StepContext
int* bulletBodies;
b3AtomicInt bulletBodyCount;
b3AtomicInt anyRestitution;
// Contact ids for simplified parallel-for access. Used in narrow-phase.
// These contacts may or may not be touching. They are associated with awake bodies.
int* awakeContactIndices;