Table of Contents

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

float

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

float

AllowSleep

Enable/Disable sleeping

public static bool AllowSleep

Field Value

bool

AngularSleepTolerance

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

public const float AngularSleepTolerance = 0.03490659

Field Value

float

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

float

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

bool

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

float

ContinuousPhysics

Enable/Disable Continuous Collision Detection (CCD)

public static bool ContinuousPhysics

Field Value

bool

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

bool

Epsilon

The epsilon

public const float Epsilon = 1.1920929E-07

Field Value

float

LinearSleepTolerance

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

public const float LinearSleepTolerance = 0.01

Field Value

float

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

float

MaxAngularCorrection

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

public const float MaxAngularCorrection = 0.13962635

Field Value

float

MaxFloat

The max float

public const float MaxFloat = 3.4028235E+38

Field Value

float

MaxGJKIterations

Defines the maximum number of iterations made by the GJK algorithm.

public const int MaxGJKIterations = 20

Field Value

int

MaxLinearCorrection

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

public const float MaxLinearCorrection = 0.2

Field Value

float

MaxManifoldPoints

The maximum number of contact points between two convex shapes. DO NOT CHANGE THIS VALUE!

public const int MaxManifoldPoints = 2

Field Value

int

MaxPolygonVertices

The maximum number of vertices on a convex polygon.

public static int MaxPolygonVertices

Field Value

int

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

float

MaxRotationSquared

The max rotation

public const float MaxRotationSquared = 2.4674013

Field Value

float

MaxSubSteps

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

public const int MaxSubSteps = 8

Field Value

int

MaxTOIContacts

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

public const int MaxTOIContacts = 32

Field Value

int

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

float

MaxTranslationSquared

The max translation

public const float MaxTranslationSquared = 4

Field Value

float

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

float

PositionIterations

The number of position iterations used in the solver.

public static int PositionIterations

Field Value

int

TOIPositionIterations

The number of position iterations in the TOI solver

public static int TOIPositionIterations

Field Value

int

TOIVelocityIterations

The number of velocity iterations in the TOI solver

public static int TOIVelocityIterations

Field Value

int

TimeToSleep

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

public const float TimeToSleep = 0.5

Field Value

float

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

bool

VelocityIterations

The number of velocity iterations used in the solver.

public static int VelocityIterations

Field Value

int

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

float

Methods

MixFriction(float, float)

Friction mixing law. Feel free to customize this.

public static float MixFriction(float friction1, float friction2)

Parameters

friction1 float

The friction1.

friction2 float

The friction2.

Returns

float

MixRestitution(float, float)

Restitution mixing law. Feel free to customize this.

public static float MixRestitution(float restitution1, float restitution2)

Parameters

restitution1 float

The restitution1.

restitution2 float

The restitution2.

Returns

float