Classes | Macros | Functions
b2_settings.h File Reference
#include "b2_types.h"
#include "b2_api.h"
#include <stdarg.h>
#include <stdint.h>
#include "b2_common.h"
Include dependency graph for b2_settings.h:
This graph shows which files directly or indirectly include this file:

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   14
 

Functions

voidb2Alloc (int32 size)
 Implement this function to use your own memory allocator. More...
 
B2_API voidb2Alloc_Default (int32 size)
 Default allocation functions. More...
 
void b2Free (void *mem)
 If you implement b2Alloc, you should also implement this function. More...
 
B2_API void b2Free_Default (void *mem)
 
void b2Log (const char *string,...)
 Implement this to use your own logging. More...
 
B2_API void b2Log_Default (const char *string, va_list args)
 Default logging function. More...
 

Detailed Description

Settings that can be overriden for your application

Definition in file b2_settings.h.

Macro Definition Documentation

◆ b2_lengthUnitsPerMeter

#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.

Definition at line 49 of file b2_settings.h.

◆ b2_maxPolygonVertices

#define b2_maxPolygonVertices   14

The maximum number of vertices on a convex polygon. You cannot increase this too much because b2BlockAllocator has a maximum object size.

Definition at line 53 of file b2_settings.h.

Function Documentation

◆ b2Alloc()

void* b2Alloc ( int32  size)
inline

Implement this function to use your own memory allocator.

Definition at line 100 of file b2_settings.h.

◆ b2Alloc_Default()

B2_API void* b2Alloc_Default ( int32  size)

Default allocation functions.

Definition at line 33 of file b2_settings.cpp.

◆ b2Free()

void b2Free ( void mem)
inline

If you implement b2Alloc, you should also implement this function.

Definition at line 106 of file b2_settings.h.

◆ b2Free_Default()

B2_API void b2Free_Default ( void mem)

Definition at line 38 of file b2_settings.cpp.

◆ b2Log()

void b2Log ( const char *  string,
  ... 
)
inline

Implement this to use your own logging.

Definition at line 115 of file b2_settings.h.

◆ b2Log_Default()

B2_API void b2Log_Default ( const char *  string,
va_list  args 
)

Default logging function.

Definition at line 44 of file b2_settings.cpp.



mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22