box3d/shared/stability.h
Erin Catto c37cfe4cd7
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
2026-07-18 22:43:03 -07:00

34 lines
786 B
C

// SPDX-FileCopyrightText: 2026 Erin Catto
// SPDX-License-Identifier: MIT
#pragma once
#include "box3d/id.h"
#include "box3d/math_functions.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define MESH_DROP_GRID_COUNT 20
// Thin fast boxes dropped on a wave mesh. Stresses continuous collision and mesh contact
// stability, and doubles as a determinism scenario via the sleep hash.
typedef struct MeshDropData
{
struct b3MeshData* mesh;
b3BodyId bodies[MESH_DROP_GRID_COUNT * MESH_DROP_GRID_COUNT];
int stepCount;
int sleepStep;
uint32_t hash;
} MeshDropData;
MeshDropData CreateMeshDrop( b3WorldId worldId, b3Pos origin );
bool UpdateMeshDrop( b3WorldId worldId, MeshDropData* data );
void DestroyMeshDrop( MeshDropData* data );
#ifdef __cplusplus
}
#endif