b2Settings.h File Reference
Global tuning constants based on meters-kilograms-seconds (MKS) units. More...
Classes | |
struct | b2Version |
Version numbering scheme. More... | |
Functions | |
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. | |
float32 | b2MixFriction (float32 friction1, float32 friction2) |
Friction mixing law. Feel free to customize this. | |
float32 | b2MixRestitution (float32 restitution1, float32 restitution2) |
Restitution mixing law. Feel free to customize this. | |
Variables | |
const float32 | b2_linearSlop = 0.005f |
A small length used as a collision and constraint tolerance. | |
const float32 | b2_angularSlop = 2.0f / 180.0f * b2_pi |
A small angle used as a collision and constraint tolerance. | |
const float32 | b2_toiSlop = 8.0f * b2_linearSlop |
Continuous collision detection (CCD) works with core, shrunken shapes. | |
const int32 | b2_maxTOIContactsPerIsland = 32 |
Maximum number of contacts to be handled to solve a TOI island. | |
const float32 | b2_velocityThreshold = 1.0f |
A velocity threshold for elastic collisions. | |
const float32 | b2_maxLinearCorrection = 0.2f |
The maximum linear position correction used when solving constraints. | |
const float32 | b2_maxAngularCorrection = 8.0f / 180.0f * b2_pi |
The maximum angular position correction used when solving constraints. | |
const float32 | b2_maxLinearVelocity = 200.0f |
The maximum linear velocity of a body. | |
const float32 | b2_maxAngularVelocity = 250.0f |
The maximum angular velocity of a body. | |
const float32 | b2_contactBaumgarte = 0.2f |
This scale factor controls how fast overlap is resolved. | |
const float32 | b2_timeToSleep = 0.5f |
The time that a body must be still before it will go to sleep. | |
const float32 | b2_linearSleepTolerance = 0.01f |
A body cannot sleep if its linear velocity is above this tolerance. | |
const float32 | b2_angularSleepTolerance = 2.0f / 180.0f |
A body cannot sleep if its angular velocity is above this tolerance. | |
int32 | b2_byteCount |
The current number of bytes allocated through b2Alloc. | |
b2Version | b2_version |
Current version. |
Detailed Description
Global tuning constants based on meters-kilograms-seconds (MKS) units.
Variable Documentation
const float32 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.
const float32 b2_contactBaumgarte = 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.
const float32 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.
const float32 b2_maxAngularCorrection = 8.0f / 180.0f * b2_pi |
The maximum angular position correction used when solving constraints.
This helps to prevent overshoot.
const float32 b2_maxAngularVelocity = 250.0f |
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.
const float32 b2_maxLinearCorrection = 0.2f |
The maximum linear position correction used when solving constraints.
This helps to prevent overshoot.
const float32 b2_maxLinearVelocity = 200.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.
const float32 b2_toiSlop = 8.0f * b2_linearSlop |
Continuous collision detection (CCD) works with core, shrunken shapes.
This is the amount by which shapes are automatically shrunk to work with CCD. This must be larger than b2_linearSlop.
const float32 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.
Generated on Sun Apr 13 15:21:27 2008 for Box2D by 1.5.4