C# Class FarseerPhysics.Settings

Mostrar archivo Open project: prime31/Nez

Public Properties

Property Type Description
allCollisionCallbacksAgree bool
allowSleep bool
continuousPhysics bool
defaultFixtureCollidesWith Category
defaultFixtureCollisionCategories Category
defaultFixtureIgnoreCCDWith Category
enableDiagnostics bool
enableWarmstarting bool
maxPolygonVertices int
maxSubSteps int
positionIterations int
skipSanityChecks bool
toiPositionIterations int
toiVelocityIterations int
useConvexHullPolygons bool
useFPECollisionCategories bool
velocityIterations int

Public Methods

Method Description
mixFriction ( float friction1, float friction2 ) : float

Friction mixing law. Feel free to customize this.

mixRestitution ( float restitution1, float restitution2 ) : float

Restitution mixing law. Feel free to customize this.

Method Details

mixFriction() public static method

Friction mixing law. Feel free to customize this.
public static mixFriction ( float friction1, float friction2 ) : float
friction1 float The friction1.
friction2 float The friction2.
return float

mixRestitution() public static method

Restitution mixing law. Feel free to customize this.
public static mixRestitution ( float restitution1, float restitution2 ) : float
restitution1 float The restitution1.
restitution2 float The restitution2.
return float

Property Details

allCollisionCallbacksAgree public_oe static_oe property

If true, all collision callbacks have to return the same value, and agree if there was a collision or not. Swtich this to false to revert to the collision agreement used in FPE 3.3.x
public static bool allCollisionCallbacksAgree
return bool

allowSleep public_oe static_oe property

Enable/Disable sleeping
public static bool allowSleep
return bool

continuousPhysics public_oe static_oe property

Enable/Disable Continuous Collision Detection (CCD)
public static bool continuousPhysics
return bool

defaultFixtureCollidesWith public_oe static_oe property

This is used by the Fixture constructor as the default value for Fixture.collidesWith member.
public static Category defaultFixtureCollidesWith
return Category

defaultFixtureCollisionCategories public_oe static_oe property

This is used by the Fixture constructor as the default value for Fixture.collisionCategories member. Note that you may need to change this depending on the setting of UseFPECollisionCategories, above.
public static Category defaultFixtureCollisionCategories
return Category

defaultFixtureIgnoreCCDWith public_oe static_oe property

This is used by the Fixture constructor as the default value for Fixture.ignoreCCDWith member.
public static Category defaultFixtureIgnoreCCDWith
return Category

enableDiagnostics public_oe static_oe property

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 static bool enableDiagnostics
return bool

enableWarmstarting public_oe static_oe property

Enable/Disable warmstarting
public static bool enableWarmstarting
return bool

maxPolygonVertices public_oe static_oe property

The maximum number of vertices on a convex polygon.
public static int maxPolygonVertices
return int

maxSubSteps public_oe static_oe property

Maximum number of sub-steps per contact in continuous physics simulation.
public static int maxSubSteps
return int

positionIterations public_oe static_oe property

The number of position iterations used in the solver.
public static int positionIterations
return int

skipSanityChecks public_oe static_oe property

Set this to true to skip sanity checks in the engine. This will speed up the tools by removing the overhead of the checks, but you will need to handle checks yourself where it is needed.
public static bool skipSanityChecks
return bool

toiPositionIterations public_oe static_oe property

The number of position iterations in the TOI solver
public static int toiPositionIterations
return int

toiVelocityIterations public_oe static_oe property

The number of velocity iterations in the TOI solver
public static int toiVelocityIterations
return int

useConvexHullPolygons public_oe static_oe property

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
return bool

useFPECollisionCategories public_oe static_oe property

Farseer Physics Engine has a different way of filtering fixtures than Box2d. We have both FPE and Box2D filtering in the engine. If you are upgrading from earlier versions of FPE, set this to true and defaultFixtureCollisionCategories to Category.All.
public static bool useFPECollisionCategories
return bool

velocityIterations public_oe static_oe property

The number of velocity iterations used in the solver.
public static int velocityIterations
return int