Class Settings
- Namespace
- Alis.Core.Physic
- Assembly
- Alis.dll
The settings class
public static class Settings
Inheritance
Inherited Members
Fields
AABBExtension
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.
public const float AABBExtension = 0.1
Field Value
AABBMultiplier
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.
public const float AABBMultiplier = 2
Field Value
AllowSleep
Enable/Disable sleeping
public static bool AllowSleep
Field Value
AngularSleepTolerance
A body cannot sleep if its angular velocity is above this tolerance.
public const float AngularSleepTolerance = 0.03490659
Field Value
AngularSlop
A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
public const float AngularSlop = 0.03490659
Field Value
AutoClearForces
By default, forces are cleared automatically after each call to Step. The default behavior is modified with this setting. The purpose of this setting is to support sub-stepping. Sub-stepping is often used to maintain a fixed sized time step under a variable frame-rate. When you perform sub-stepping you should disable auto clearing of forces and instead call ClearForces after all sub-steps are complete in one pass of your game loop.
public const bool AutoClearForces = true
Field Value
Baumgarte
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.
public const float Baumgarte = 0.2
Field Value
ContinuousPhysics
Enable/Disable Continuous Collision Detection (CCD)
public static bool ContinuousPhysics
Field Value
EnableDiagnostics
Enabling diagnistics causes the engine to gather timing information. You can see how much time it took to solve the contacts, solve CCD and update the controllers. NOTE: If you are using a debug view that shows performance counters, you might want to enable this.
public const bool EnableDiagnostics = true
Field Value
Epsilon
The epsilon
public const float Epsilon = 1.1920929E-07
Field Value
LinearSleepTolerance
A body cannot sleep if its linear velocity is above this tolerance.
public const float LinearSleepTolerance = 0.01
Field Value
LinearSlop
A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
public const float LinearSlop = 0.005
Field Value
MaxAngularCorrection
The maximum angular position correction used when solving constraints. This helps to prevent overshoot.
public const float MaxAngularCorrection = 0.13962635
Field Value
MaxFloat
The max float
public const float MaxFloat = 3.4028235E+38
Field Value
MaxGJKIterations
Defines the maximum number of iterations made by the GJK algorithm.
public const int MaxGJKIterations = 20
Field Value
MaxLinearCorrection
The maximum linear position correction used when solving constraints. This helps to prevent overshoot.
public const float MaxLinearCorrection = 0.2
Field Value
MaxManifoldPoints
The maximum number of contact points between two convex shapes. DO NOT CHANGE THIS VALUE!
public const int MaxManifoldPoints = 2
Field Value
MaxPolygonVertices
The maximum number of vertices on a convex polygon.
public static int MaxPolygonVertices
Field Value
MaxRotation
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.
public const float MaxRotation = 1.5707964
Field Value
MaxRotationSquared
The max rotation
public const float MaxRotationSquared = 2.4674013
Field Value
MaxSubSteps
Maximum number of sub-steps per contact in continuous physics simulation.
public const int MaxSubSteps = 8
Field Value
MaxTOIContacts
Maximum number of contacts to be handled to solve a TOI impact.
public const int MaxTOIContacts = 32
Field Value
MaxTranslation
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.
public const float MaxTranslation = 2
Field Value
MaxTranslationSquared
The max translation
public const float MaxTranslationSquared = 4
Field Value
PolygonRadius
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.
public const float PolygonRadius = 0.01
Field Value
PositionIterations
The number of position iterations used in the solver.
public static int PositionIterations
Field Value
TOIPositionIterations
The number of position iterations in the TOI solver
public static int TOIPositionIterations
Field Value
TOIVelocityIterations
The number of velocity iterations in the TOI solver
public static int TOIVelocityIterations
Field Value
TimeToSleep
The time that a body must be still before it will go to sleep.
public const float TimeToSleep = 0.5
Field Value
UseConvexHullPolygons
If true, it will run a GiftWrap convex hull on all polygon inputs. This makes for a more stable engine when given random input, but if speed of the creation of polygons are more important, you might want to set this to false.
public static bool UseConvexHullPolygons
Field Value
VelocityIterations
The number of velocity iterations used in the solver.
public static int VelocityIterations
Field Value
VelocityThreshold
A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.
public const float VelocityThreshold = 1
Field Value
Methods
MixFriction(float, float)
Friction mixing law. Feel free to customize this.
public static float MixFriction(float friction1, float friction2)
Parameters
Returns
MixRestitution(float, float)
Restitution mixing law. Feel free to customize this.
public static float MixRestitution(float restitution1, float restitution2)