Classes | Macros | Typedefs | Functions | Variables
b2Settings.h File Reference
#include <stddef.h>
#include <assert.h>
#include <float.h>
Include dependency graph for b2Settings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  b2Version
 

Macros

#define b2_aabbExtension   0.1f
 
#define b2_aabbMultiplier   2.0f
 
#define b2_angularSleepTolerance   (2.0f / 180.0f * b2_pi)
 A body cannot sleep if its angular velocity is above this tolerance. More...
 
#define b2_angularSlop   (2.0f / 180.0f * b2_pi)
 
#define b2_baumgarte   0.2f
 
#define b2_epsilon   FLT_EPSILON
 
#define b2_linearSleepTolerance   0.01f
 A body cannot sleep if its linear velocity is above this tolerance. More...
 
#define b2_linearSlop   0.005f
 
#define b2_maxAngularCorrection   (8.0f / 180.0f * b2_pi)
 
#define b2_maxFloat   FLT_MAX
 
#define b2_maxLinearCorrection   0.2f
 
#define b2_maxManifoldPoints   2
 
#define b2_maxPolygonVertices   8
 
#define b2_maxRotation   (0.5f * b2_pi)
 
#define b2_maxRotationSquared   (b2_maxRotation * b2_maxRotation)
 
#define b2_maxSubSteps   8
 Maximum number of sub-steps per contact in continuous physics simulation. More...
 
#define b2_maxTOIContacts   32
 Maximum number of contacts to be handled to solve a TOI impact. More...
 
#define b2_maxTranslation   2.0f
 
#define b2_maxTranslationSquared   (b2_maxTranslation * b2_maxTranslation)
 
#define B2_NOT_USED(x)   ((void)(x))
 
#define b2_pi   3.14159265359f
 
#define b2_polygonRadius   (2.0f * b2_linearSlop)
 
#define b2_timeToSleep   0.5f
 The time that a body must be still before it will go to sleep. More...
 
#define b2_toiBaugarte   0.75f
 
#define b2_velocityThreshold   1.0f
 
#define b2Assert(A)   assert(A)
 

Typedefs

typedef float float32
 
typedef double float64
 
typedef signed short int16
 
typedef signed int int32
 
typedef signed char int8
 
typedef unsigned short uint16
 
typedef unsigned int uint32
 
typedef unsigned char uint8
 

Functions

voidb2Alloc (int32 size)
 Implement this function to use your own memory allocator. More...
 
void b2Free (void *mem)
 If you implement b2Alloc, you should also implement this function. More...
 
void b2Log (const char *string,...)
 Logging function. More...
 

Variables

b2Version b2_version
 Current version. More...
 

Detailed Description

Global tuning constants based on meters-kilograms-seconds (MKS) units.

Definition in file b2Settings.h.

Macro Definition Documentation

#define b2_aabbExtension   0.1f

This is used to fatten AABBs in the dynamic tree. This allows proxies to move by a small amount without triggering a tree adjustment. This is in meters.

Definition at line 59 of file b2Settings.h.

#define b2_aabbMultiplier   2.0f

This is used to fatten AABBs in the dynamic tree. This is used to predict the future position based on the current displacement. This is a dimensionless multiplier.

Definition at line 64 of file b2Settings.h.

#define b2_angularSleepTolerance   (2.0f / 180.0f * b2_pi)

A body cannot sleep if its angular velocity is above this tolerance.

Definition at line 126 of file b2Settings.h.

#define b2_angularSlop   (2.0f / 180.0f * b2_pi)

A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.

Definition at line 72 of file b2Settings.h.

#define b2_baumgarte   0.2f

This scale factor controls how fast overlap is resolved. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often lead to overshoot.

Definition at line 113 of file b2Settings.h.

#define b2_epsilon   FLT_EPSILON

Definition at line 39 of file b2Settings.h.

#define b2_linearSleepTolerance   0.01f

A body cannot sleep if its linear velocity is above this tolerance.

Definition at line 123 of file b2Settings.h.

#define b2_linearSlop   0.005f

A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.

Definition at line 68 of file b2Settings.h.

#define b2_maxAngularCorrection   (8.0f / 180.0f * b2_pi)

The maximum angular position correction used when solving constraints. This helps to prevent overshoot.

Definition at line 98 of file b2Settings.h.

#define b2_maxFloat   FLT_MAX

Definition at line 38 of file b2Settings.h.

#define b2_maxLinearCorrection   0.2f

The maximum linear position correction used when solving constraints. This helps to prevent overshoot.

Definition at line 94 of file b2Settings.h.

#define b2_maxManifoldPoints   2

The maximum number of contact points between two convex shapes. Do not change this value.

Definition at line 50 of file b2Settings.h.

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

Definition at line 54 of file b2Settings.h.

#define b2_maxRotation   (0.5f * b2_pi)

The maximum angular velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this.

Definition at line 107 of file b2Settings.h.

#define b2_maxRotationSquared   (b2_maxRotation * b2_maxRotation)

Definition at line 108 of file b2Settings.h.

#define b2_maxSubSteps   8

Maximum number of sub-steps per contact in continuous physics simulation.

Definition at line 80 of file b2Settings.h.

#define b2_maxTOIContacts   32

Maximum number of contacts to be handled to solve a TOI impact.

Definition at line 86 of file b2Settings.h.

#define b2_maxTranslation   2.0f

The maximum linear velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this.

Definition at line 102 of file b2Settings.h.

#define b2_maxTranslationSquared   (b2_maxTranslation * b2_maxTranslation)

Definition at line 103 of file b2Settings.h.

#define B2_NOT_USED (   x)    ((void)(x))

Definition at line 26 of file b2Settings.h.

#define b2_pi   3.14159265359f

Definition at line 40 of file b2Settings.h.

#define b2_polygonRadius   (2.0f * b2_linearSlop)

The radius of the polygon/edge shape skin. This should not be modified. Making this smaller means polygons will have an insufficient buffer for continuous collision. Making it larger may create artifacts for vertex collision.

Definition at line 77 of file b2Settings.h.

#define b2_timeToSleep   0.5f

The time that a body must be still before it will go to sleep.

Definition at line 120 of file b2Settings.h.

#define b2_toiBaugarte   0.75f

Definition at line 114 of file b2Settings.h.

#define b2_velocityThreshold   1.0f

A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.

Definition at line 90 of file b2Settings.h.

#define b2Assert (   A)    assert(A)

Definition at line 27 of file b2Settings.h.

Typedef Documentation

typedef float float32

Definition at line 35 of file b2Settings.h.

typedef double float64

Definition at line 36 of file b2Settings.h.

typedef signed short int16

Definition at line 30 of file b2Settings.h.

typedef signed int int32

Definition at line 31 of file b2Settings.h.

typedef signed char int8

Definition at line 29 of file b2Settings.h.

typedef unsigned short uint16

Definition at line 33 of file b2Settings.h.

typedef unsigned int uint32

Definition at line 34 of file b2Settings.h.

typedef unsigned char uint8

Definition at line 32 of file b2Settings.h.

Function Documentation

void* b2Alloc ( int32  size)

Implement this function to use your own memory allocator.

Definition at line 27 of file b2Settings.cpp.

void b2Free ( void mem)

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

Definition at line 32 of file b2Settings.cpp.

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

Logging function.

Definition at line 38 of file b2Settings.cpp.

Variable Documentation

b2Version b2_version

Current version.

Definition at line 24 of file b2Settings.cpp.



mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:51