Click or drag to resize

World Class

The world class manages all physics entities, dynamic simulation, and asynchronous queries.
Inheritance Hierarchy
SystemObject
  Internal.tainicom.Aether.Physics2D.DynamicsWorld

Namespace:  Internal.tainicom.Aether.Physics2D.Dynamics
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public class World

The World type exposes the following members.

Constructors
  NameDescription
Public methodWorld
Initializes a new instance of the World class.
Public methodWorld(IBroadPhase)
Initializes a new instance of the World class.
Public methodWorld(Vector2)
Initializes a new instance of the World class.
Top
Properties
  NameDescription
Public propertyAddRemoveTime
Public propertyContactCount
Get the number of contacts (each may have 0 or more contact points).
Public propertyCode exampleContactList
Get the world contact list. ContactList is the head of a circular linked list. Use Contact.Next to get the next contact in the world list. A contact equal to ContactList indicates the end of the list.
Public propertyContactsUpdateTime
Public propertyContinuousPhysicsTime
Public propertyControllersUpdateTime
Public propertyEnabled
If false, the whole simulation stops. It still processes added and removed geometries.
Public propertyGravity
Change the global gravity vector.
Public propertyIsland
Public propertyIsLocked
Is the world locked (in the middle of a time step).
Public propertyNewContactsTime
Public propertyProxyCount
Get the number of broad-phase proxies.
Public propertySolveUpdateTime
Public propertyUpdateTime
Top
Methods
  NameDescription
Public methodAdd(Body)
Add a rigid body. Warning: This method is locked during callbacks.
Public methodAdd(Controller)
Warning: This method is locked during callbacks.
Public methodAdd(Joint)
Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding. Warning: This method is locked during callbacks.
Public methodClear
Warning: This method is locked during callbacks.
Public methodClearForces
Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function.
Public methodCreateBody
Public methodCreateCapsule(Single, Single, Single, Vector2, Single, BodyType)
Public methodCreateCapsule(Single, Single, Int32, Single, Int32, Single, Vector2, Single, BodyType)
Public methodCreateChain
Creates a chain.
Public methodCreateChainShape
Public methodCreateCircle
Public methodCreateCompoundPolygon
Public methodCreateEdge
Public methodCreateEllipse
Public methodCreateGear
Public methodCreateLineArc
Public methodCreateLoopShape
Public methodCreatePolygon
Public methodCreateRectangle
Public methodCreateRoundedRectangle
Public methodCreateSolidArc
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodQueryAABB(QueryReportFixtureDelegate, AABB)
Query the world for all fixtures that potentially overlap the provided AABB. Inside the callback: Return true: Continues the query Return false: Terminate the query
Public methodQueryAABB(QueryReportFixtureDelegate, AABB)
Query the world for all fixtures that potentially overlap the provided AABB. Inside the callback: Return true: Continues the query Return false: Terminate the query
Public methodRayCast
Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point. Inside the callback: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue
Public methodRemove(Body)
Destroy a rigid body. Warning: This automatically deletes all associated shapes and joints. Warning: This method is locked during callbacks.
Public methodRemove(Controller)
Warning: This method is locked during callbacks.
Public methodRemove(Joint)
Destroy a joint. This may cause the connected bodies to begin colliding. Warning: This method is locked during callbacks.
Public methodShiftOrigin
Public methodStep(Single)
Take a time step. This performs collision detection, integration, and consraint solution. Warning: This method is locked during callbacks.
Public methodStep(TimeSpan)
Take a time step. This performs collision detection, integration, and consraint solution.
Public methodStep(Single, SolverIterations)
Take a time step. This performs collision detection, integration, and consraint solution. Warning: This method is locked during callbacks.
Public methodStep(TimeSpan, SolverIterations)
Take a time step. This performs collision detection, integration, and consraint solution.
Public methodTestPoint
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldBodyAdded
Fires whenever a body has been added
Public fieldBodyList
Get the world body list.
Public fieldBodyRemoved
Fires whenever a body has been removed
Public fieldContactManager
Get the contact manager for testing.
Public fieldControllerAdded
Fires every time a controller is added to the World.
Public fieldControllerList
Public fieldControllerRemoved
Fires every time a controlelr is removed form the World.
Public fieldFixtureAdded
Fires whenever a fixture has been added
Public fieldFixtureRemoved
Fires whenever a fixture has been removed
Public fieldJointAdded
Fires whenever a joint has been added
Public fieldJointList
Get the world joint list.
Public fieldJointRemoved
Fires whenever a joint has been removed
Public fieldTag
Set the user data. Use this to store your application specific data.
Top
Extension Methods
See Also