27 #define B2_NOT_USED(x) ((void)(x))
29 #define b2Assert(A) assert(A)
30 #define B2_ASSERT_ENABLED 1
33 #define B2_ASSERT_ENABLED 0
38 #define B2_DEBUG_STATEMENT(A) A
40 #define B2_DEBUG_STATEMENT(A)
44 #define B2_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
46 typedef signed char int8;
47 typedef signed short int16;
48 typedef signed int int32;
49 typedef unsigned char uint8;
50 typedef unsigned short uint16;
51 typedef unsigned int uint32;
52 typedef float float32;
53 typedef double float64;
56 typedef __int64 int64;
57 typedef unsigned __int64 uint64;
59 typedef long long int64;
60 typedef unsigned long long uint64;
63 #define b2_maxFloat FLT_MAX
64 #define b2_epsilon FLT_EPSILON
65 #define b2_pi 3.14159265359f
67 #if !defined(b2Inline)
69 #define b2Inline __attribute__((always_inline))
71 #define b2Inline inline
72 #endif // defined(__GNUC__)
73 #endif // !defined(b2Inline)
83 #define b2_maxManifoldPoints 2
87 #define b2_maxPolygonVertices 8
92 #define b2_aabbExtension 0.1f
97 #define b2_aabbMultiplier 2.0f
101 #define b2_linearSlop 0.005f
105 #define b2_angularSlop (2.0f / 180.0f * b2_pi)
110 #define b2_polygonRadius (2.0f * b2_linearSlop)
113 #define b2_maxSubSteps 8
119 #define b2_maxTOIContacts 32
123 #define b2_velocityThreshold 1.0f
127 #define b2_maxLinearCorrection 0.2f
131 #define b2_maxAngularCorrection (8.0f / 180.0f * b2_pi)
135 #define b2_maxTranslation 2.0f
136 #define b2_maxTranslationSquared (b2_maxTranslation * b2_maxTranslation)
140 #define b2_maxRotation (0.5f * b2_pi)
141 #define b2_maxRotationSquared (b2_maxRotation * b2_maxRotation)
146 #define b2_baumgarte 0.2f
147 #define b2_toiBaugarte 0.75f
153 #define b2_invalidParticleIndex (-1)
156 #define b2_particleStride 0.75f
159 #define b2_minParticleWeight 1.0f
162 #define b2_maxParticlePressure 0.25f
165 #define b2_maxParticleForce 0.5f
169 #define b2_maxTriadDistance 2
170 #define b2_maxTriadDistanceSquared (b2_maxTriadDistance * b2_maxTriadDistance)
173 #define b2_minParticleSystemBufferCapacity 256
176 #define b2_barrierCollisionTime 2.5f
181 #define b2_timeToSleep 0.5f
184 #define b2_linearSleepTolerance 0.01f
187 #define b2_angularSleepTolerance (2.0f / 180.0f * b2_pi)
198 typedef void* (*b2AllocFunction)(int32 size,
void* callbackData);
219 void b2Log(
const char*
string, ...);
void b2Log(const char *string,...)
Logging function.
Definition: b2Settings.cpp:116
void(* b2FreeFunction)(void *mem, void *callbackData)
Use this function to override b2Free() without recompiling this library.
Definition: b2Settings.h:200
int32 minor
incremental changes
Definition: b2Settings.h:226
void b2Free(void *mem)
If you implement b2Alloc, you should also implement this function.
Definition: b2Settings.cpp:99
void * b2Alloc(int32 size)
Implement this function to use your own memory allocator.
Definition: b2Settings.cpp:93
void *(* b2AllocFunction)(int32 size, void *callbackData)
Use this function to override b2Alloc() without recompiling this library.
Definition: b2Settings.h:198
b2Version b2_version
Definition: b2Settings.cpp:25
Definition: b2Settings.h:223
const char * b2_liquidFunVersionString
Definition: b2Settings.cpp:41
int32 major
significant changes
Definition: b2Settings.h:225
int32 b2GetNumAllocs()
Get number of calls to b2Alloc minus number of calls to b2Free.
Definition: b2Settings.cpp:110
const b2Version b2_liquidFunVersion
Global variable is used to identify the version of LiquidFun.
Definition: b2Settings.cpp:36
void b2SetNumAllocs(const int32 numAllocs)
Definition: b2Settings.cpp:105
void b2SetAllocFreeCallbacks(b2AllocFunction allocCallback, b2FreeFunction freeCallback, void *callbackData)
Definition: b2Settings.cpp:72
int32 revision
bug fixes
Definition: b2Settings.h:227