box2d 3.0.0
A 2D physics engine for games
 
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2023 Erin Catto
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
14
15// todo move constraint hertz/damping here
16
17#include "user_constants.h"
18
21#ifndef b2_lengthUnitsPerMeter
22#define b2_lengthUnitsPerMeter 1.0f
23#endif
24
26#define b2_pi 3.14159265359f
27
32#define b2_aabbMargin (0.1f * b2_lengthUnitsPerMeter)
33
37#define b2_linearSlop (0.005f * b2_lengthUnitsPerMeter)
38
42#define b2_angularSlop (2.0f / 180.0f * b2_pi)
43
46#ifndef b2_maxPolygonVertices
47#define b2_maxPolygonVertices 8
48#endif
49
51#define b2_maxWorlds 32
52
56#define b2_maxTranslation (4.0f * b2_lengthUnitsPerMeter)
57
61#define b2_maxRotation (0.5f * b2_pi)
62
64#define b2_speculativeDistance (4.0f * b2_linearSlop)
65
67#define b2_timeToSleep 0.5f
68
70#define b2_linearSleepTolerance (0.01f * b2_lengthUnitsPerMeter)
71
73#define b2_angularSleepTolerance (2.0f / 180.0f * b2_pi)
74
77#define b2_huge (100000.0f * b2_lengthUnitsPerMeter)
78
80#define b2_maxWorkers 64
81
83#define b2_graphColorCount 12
84
87typedef struct b2Version
88{
90 int major;
91
93 int minor;
94
96 int revision;
97} b2Version;
98
100static const b2Version b2_version = {3, 0, 0};
int minor
bug fixes
Definition constants.h:93
int major
< significant changes
Definition constants.h:90
Definition constants.h:88