org.jbox2d.common
Class Settings

java.lang.Object
  extended by org.jbox2d.common.Settings

public class Settings
extends Object

Global tuning constants based on MKS units and various integer maximums (vertices per shape, pairs, etc.).


Field Summary
static float angularSleepTolerance
          A body cannot sleep if its angular velocity is above this tolerance.
static float angularSlop
          A small angle used as a collision and constraint tolerance.
static float contactBaumgarte
          This scale factor controls how fast overlap is resolved.
static float EPSILON
          A "close to zero" float epsilon value for use
static float lengthUnitsPerMeter
           
static float linearSleepTolerance
          A body cannot sleep if its linear velocity is above this tolerance.
static float linearSlop
          A small length used as a collision and constraint tolerance.
static float massUnitsPerKilogram
           
static float maxAngularCorrection
          The maximum angular position correction used when solving constraints.
static float maxAngularVelocity
          The maximum angular velocity of a body.
static float maxAngularVelocitySquared
           
static float maxLinearCorrection
          The maximum linear position correction used when solving constraints.
static float maxLinearVelocity
          The maximum linear velocity of a body.
static float maxLinearVelocitySquared
           
static int maxManifoldPoints
           
static int maxPairs
          Must be a power of two.
static int maxPolygonVertices
           
static int maxProxies
          Must be a power of two.
static int maxShapesPerBody
           
static int maxTOIContactsPerIsland
          Maximum number of contacts to be handled to solve a TOI island.
static int maxTOIJointsPerIsland
          Maximum number of joints to be handled to solve a TOI island.
static float pi
          Pi.
static float timeToSleep
          The time that a body must be still before it will go to sleep.
static float timeUnitsPerSecond
           
static float toiSlop
          Continuous collision detection (CCD) works with core, shrunken shapes.
static float velocityThreshold
          A velocity threshold for elastic collisions.
 
Constructor Summary
Settings()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPSILON

public static final float EPSILON
A "close to zero" float epsilon value for use

See Also:
Constant Field Values

pi

public static final float pi
Pi.

See Also:
Constant Field Values

lengthUnitsPerMeter

public static final float lengthUnitsPerMeter
See Also:
Constant Field Values

massUnitsPerKilogram

public static final float massUnitsPerKilogram
See Also:
Constant Field Values

timeUnitsPerSecond

public static final float timeUnitsPerSecond
See Also:
Constant Field Values

maxManifoldPoints

public static final int maxManifoldPoints
See Also:
Constant Field Values

maxShapesPerBody

public static final int maxShapesPerBody
See Also:
Constant Field Values

maxPolygonVertices

public static final int maxPolygonVertices
See Also:
Constant Field Values

maxProxies

public static final int maxProxies
Must be a power of two.

See Also:
Constant Field Values

maxPairs

public static final int maxPairs
Must be a power of two.

See Also:
Constant Field Values

linearSlop

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

See Also:
Constant Field Values

angularSlop

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

See Also:
Constant Field Values

velocityThreshold

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

See Also:
Constant Field Values

maxLinearCorrection

public static final float maxLinearCorrection
The maximum linear position correction used when solving constraints. This helps to prevent overshoot.

See Also:
Constant Field Values

maxAngularCorrection

public static final float maxAngularCorrection
The maximum angular position correction used when solving constraints. This helps to prevent overshoot.

See Also:
Constant Field Values

contactBaumgarte

public static final float 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 lead to overshoot.

See Also:
Constant Field Values

timeToSleep

public static final float timeToSleep
The time that a body must be still before it will go to sleep.

See Also:
Constant Field Values

linearSleepTolerance

public static final float linearSleepTolerance
A body cannot sleep if its linear velocity is above this tolerance.

See Also:
Constant Field Values

angularSleepTolerance

public static final float angularSleepTolerance
A body cannot sleep if its angular velocity is above this tolerance.

See Also:
Constant Field Values

toiSlop

public static final float 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 b2_linearSlop.

See Also:
Constant Field Values

maxLinearVelocity

public static final float 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.

See Also:
Constant Field Values

maxLinearVelocitySquared

public static final float maxLinearVelocitySquared
See Also:
Constant Field Values

maxAngularVelocity

public static final float 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.

See Also:
Constant Field Values

maxAngularVelocitySquared

public static final float maxAngularVelocitySquared
See Also:
Constant Field Values

maxTOIContactsPerIsland

public static int maxTOIContactsPerIsland
Maximum number of contacts to be handled to solve a TOI island.


maxTOIJointsPerIsland

public static int maxTOIJointsPerIsland
Maximum number of joints to be handled to solve a TOI island.

Constructor Detail

Settings

public Settings()