blaze.common.constants
- const double
COLLISION_TOLLERANCE
;
- Unknown
- const float
DENSITY_OFFSET
;
- SPH Constants. These are used for fluid simulation
- const int
k_maxManifoldPoints
;
- Global tuning constants based on meters-kilograms-seconds (MKS) units.
- const float
k_linearSlop
;
- A small length used as a collision and constraint tolerance. Usually it is
chosen to be numerically significant, but visually insignificant.
Currently 0.5 centimeters
- const real
k_angularSlop
;
- A small angle used as a collision and constraint tolerance. Usually it is
chosen to be numerically significant, but visually insignificant.
Currently 2 degrees
- const float
k_toiSlop
;
- 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 k_linearSlop.
Currently 8 * k_linearSlop
- const int
k_maxTOIContactsPerIsland
;
- Maximum number of contacts to be handled to solve a TOI island.
Note:
It is likely that you shouldn't change this unless you really
understand what it does.
- const int
k_maxTOIJointsPerIsland
;
- Maximum number of joints to be handled to solve a TOI island.
Note:
It is likely that you shouldn't change this unless you really
understand what it does.
- const float
k_velocityThreshold
;
- A velocity threshold for elastic collisions. Any collision with a relative
linear velocity below this threshold will be treated as inelastic.
Currently 1 meter per second
- const float
k_maxLinearCorrection
;
- The maximum linear position correction used when solving constraints. This
helps to prevent overshoot.
Currently 20 cm
- const real
k_maxAngularCorrection
;
- The maximum angular position correction used when solving constraints.
This helps to prevent overshoot.
Currently 8 degrees
- const float
k_maxLinearVelocity
;
- 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.
Currently set at 200 meters per second
- const float
k_maxLinearVelocitySquared
;
- As the name suggests, this is k_maxLinearVelocity squared.
Likely pre-calculated to increase efficiency
- const float
k_maxAngularVelocity
;
- 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.
Currently set at 250 radians / second
- const float
k_maxAngularVelocitySquared
;
- As the name suggests, this is k_maxAngularVelocity squared.
Likely pre-calculated to increase efficiency
- const float
k_contactBaumgarte
;
- 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 leads to overshoot.
- const float
k_timeToSleep
;
- The time that a body must be still before it will go to sleep.
Currently half of a second
- const float
k_linearSleepTolerance
;
- A body cannot sleep if its linear velocity is above this tolerance.
Currently 1 centimeter per second
- const float
k_angularSleepTolerance
;
- A body cannot sleep if its angular velocity is above this tolerance.
Currently 2 degrees per second
- struct
Version
;
-
Version
numbering scheme.
See Also:
http:
//en.wikipedia.org/wiki/Software_versioning
- int
major
;
- < significant changes
- int
minor
;
- < incremental changes
- int
revision
;
- < bug fixes
- Version
k_version
;
- Current version.
- float
k_errorTol
;
- Unknown
- float
FORCE_SCALE
(float x);
- Magic?
- float
FORCE_INV_SCALE
(float x);
- Magic?
- float
mixFriction
(float friction1, float friction2);
- Friction mixing law. Feel free to customize this.
Params:
float friction1 |
the first friction force |
float friction2 |
the second friction force |
Returns:
The square root of the product of the two friction forces
- float
mixRestitution
(float restitution1, float restitution2);
- Restitution mixing law. Feel free to customize this.
Params:
float restitution1 |
the first force |
float restitution2 |
the other force |
Returns:
The greater of the two restitution forces
|