Box2D
2.4.1
A 2D physics engine for games
|
#include "b2_types.h"
#include "b2_api.h"
#include <stdarg.h>
#include <stdint.h>
#include "b2_common.h"
Go to the source code of this file.
Classes | |
struct | b2BodyUserData |
You can define this to inject whatever data you want in b2Body. More... | |
struct | b2FixtureUserData |
You can define this to inject whatever data you want in b2Fixture. More... | |
struct | b2JointUserData |
You can define this to inject whatever data you want in b2Joint. More... | |
Macros | |
#define | b2_lengthUnitsPerMeter 1.0f |
Define this macro in your build if you want to override settings. More... | |
#define | b2_maxPolygonVertices 8 |
Functions | |
B2_API void * | b2Alloc_Default (int32 size) |
Default allocation functions. | |
B2_API void | b2Free_Default (void *mem) |
void * | b2Alloc (int32 size) |
Implement this function to use your own memory allocator. | |
void | b2Free (void *mem) |
If you implement b2Alloc, you should also implement this function. | |
B2_API void | b2Log_Default (const char *string, va_list args) |
Default logging function. | |
void | b2Log (const char *string,...) |
Implement this to use your own logging. | |
Settings that can be overriden for your application
#define b2_lengthUnitsPerMeter 1.0f |
Define this macro in your build if you want to override settings.
You can use this to change the length scale used by your game. For example for inches you could use 39.4.
#define b2_maxPolygonVertices 8 |
The maximum number of vertices on a convex polygon. You cannot increase this too much because b2BlockAllocator has a maximum object size.