This commit is contained in:
Erin Catto 2026-11-17 12:06:00 -08:00
commit eb5b8df825
9 changed files with 69 additions and 71 deletions

View file

@ -186,17 +186,11 @@ void CreateMeshDropBodies( b3WorldId worldId, MeshDropSettings settings, uint32_
shapeDef.filter.maskBits = 1;
}
#ifdef NDEBUG
int increment = 1;
#else
int increment = 2;
#endif
uint32_t state = seed;
int index = 0;
for ( int i = 0; i < MESH_DROP_GRID_COUNT; i += increment )
for ( int i = 0; i < MESH_DROP_GRID_COUNT; ++i )
{
for ( int j = 0; j < MESH_DROP_GRID_COUNT; j += increment )
for ( int j = 0; j < MESH_DROP_GRID_COUNT; ++j )
{
// Draw for every body so a solo body gets the same velocity it has in the full drop
b3Vec3 linearVelocity = RandomVec3Uniform( &state, -1.0f, 1.0f );

View file

@ -29,7 +29,14 @@ typedef enum MeshDropShape
e_meshDropShapeCount
} MeshDropShape;
// Bodies per axis. A debug build drops a smaller patch at the same spacing so the samples app stays
// responsive. The soak tools run in release and keep the full grid.
#ifdef NDEBUG
#define MESH_DROP_GRID_COUNT 32
#else
#define MESH_DROP_GRID_COUNT 16
#endif
#define MESH_DROP_BODY_COUNT ( MESH_DROP_GRID_COUNT * MESH_DROP_GRID_COUNT )
#define MESH_DROP_DEPTH_LEVEL_COUNT 4