Tree perf (#179)

- Optimizations for falling trees.
- Increased B3_MAX_MESH_CONTACT_TRIANGLES  from 256 to 512.
This commit is contained in:
Erin Catto 2026-10-06 09:51:48 -07:00 • committed by GitHub
commit 16f7f4cf4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1926 additions and 1110 deletions

View file

@ -969,11 +969,6 @@ public:
b3CreateMeshShape( bodyId, &shapeDef, m_mesh, b3Vec3_one );
}
m_savedThreshold = b3GetStallThreshold();
// Log any CCD that takes longer than 1 ms.
b3SetStallThreshold( 0.001f );
Launch();
}
@ -1013,7 +1008,6 @@ public:
~Stall() override
{
b3DestroyMesh( m_mesh );
b3SetStallThreshold( m_savedThreshold );
}
static Sample* Create( SampleContext* context )
@ -1023,7 +1017,6 @@ public:
b3MeshData* m_mesh = nullptr;
b3BodyId m_bulletId = b3_nullBodyId;
float m_savedThreshold;
};
static int sampleStall = RegisterSample( "Continuous", "Stall", Stall::Create );