Added a compile time option to use double precision body positions. Most math remains single precision with minimal performance loss. `BOX3D_DOUBLE_PRECISION` Improved accuracy of body inertia computation when shapes are far from the body origin. WARNING: several APIs changed but migration should be straight forward if doubles are not enabled.
25 lines
418 B
C
25 lines
418 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
|
|
|
|
typedef struct MeshDropData
|
|
{
|
|
struct b3MeshData* mesh;
|
|
} MeshDropData;
|
|
|
|
MeshDropData CreateMeshDrop( b3WorldId worldId, b3Pos origin );
|
|
void DestroyMeshDrop( MeshDropData* data );
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|