Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef B2_SETTINGS_H
00020 #define B2_SETTINGS_H
00021
00022 #include <stddef.h>
00023 #include <assert.h>
00024 #include <float.h>
00025
00026 #define B2_NOT_USED(x) ((void)(x))
00027 #define b2Assert(A) assert(A)
00028
00029 typedef signed char int8;
00030 typedef signed short int16;
00031 typedef signed int int32;
00032 typedef unsigned char uint8;
00033 typedef unsigned short uint16;
00034 typedef unsigned int uint32;
00035 typedef float float32;
00036 typedef double float64;
00037
00038 #define b2_maxFloat FLT_MAX
00039 #define b2_epsilon FLT_EPSILON
00040 #define b2_pi 3.14159265359f
00041
00045
00046
00047
00050 #define b2_maxManifoldPoints 2
00051
00054 #define b2_maxPolygonVertices 8
00055
00059 #define b2_aabbExtension 0.1f
00060
00064 #define b2_aabbMultiplier 2.0f
00065
00068 #define b2_linearSlop 0.005f
00069
00072 #define b2_angularSlop (2.0f / 180.0f * b2_pi)
00073
00077 #define b2_polygonRadius (2.0f * b2_linearSlop)
00078
00080 #define b2_maxSubSteps 8
00081
00082
00083
00084
00086 #define b2_maxTOIContacts 32
00087
00090 #define b2_velocityThreshold 1.0f
00091
00094 #define b2_maxLinearCorrection 0.2f
00095
00098 #define b2_maxAngularCorrection (8.0f / 180.0f * b2_pi)
00099
00102 #define b2_maxTranslation 2.0f
00103 #define b2_maxTranslationSquared (b2_maxTranslation * b2_maxTranslation)
00104
00107 #define b2_maxRotation (0.5f * b2_pi)
00108 #define b2_maxRotationSquared (b2_maxRotation * b2_maxRotation)
00109
00113 #define b2_baumgarte 0.2f
00114 #define b2_toiBaugarte 0.75f
00115
00116
00117
00118
00120 #define b2_timeToSleep 0.5f
00121
00123 #define b2_linearSleepTolerance 0.01f
00124
00126 #define b2_angularSleepTolerance (2.0f / 180.0f * b2_pi)
00127
00128
00129
00131 void* b2Alloc(int32 size);
00132
00134 void b2Free(void* mem);
00135
00137 void b2Log(const char* string, ...);
00138
00141 struct b2Version
00142 {
00143 int32 major;
00144 int32 minor;
00145 int32 revision;
00146 };
00147
00149 extern b2Version b2_version;
00150
00151 #endif