Class GravitasPhysics2DService
- Namespace
- Gravitas
- Assembly
- Gravitas.dll
Context-owned pure 2D body, broad-phase, narrow-phase, response, and query service.
public sealed class GravitasPhysics2DService
- Inheritance
-
GravitasPhysics2DService
- Inherited Members
Constructors
GravitasPhysics2DService(GravitasWorldContext)
Creates the pure 2D physics service for a world context.
public GravitasPhysics2DService(GravitasWorldContext context)
Parameters
contextGravitasWorldContext
Properties
BodyCount
Gets the number of registered dynamic bodies.
public int BodyCount { get; }
Property Value
ColliderCount
Gets the number of registered 2D colliders.
public int ColliderCount { get; }
Property Value
LastContinuousCollisionIslandCount
Gets how many service-owned continuous-collision handoff batches were consumed during the last late step.
public int LastContinuousCollisionIslandCount { get; }
Property Value
LastContinuousCollisionIslandIterationCount
Gets how many service-owned continuous-collision handoff iterations were consumed during the last late step.
public int LastContinuousCollisionIslandIterationCount { get; }
Property Value
LastContinuousCollisionIslandLimitReached
Gets whether the service-owned continuous-collision handoff queue hit its deterministic iteration cap.
public bool LastContinuousCollisionIslandLimitReached { get; }
Property Value
SimulatePhysics
Gets or sets whether this service advances pure 2D physics.
public bool SimulatePhysics { get; set; }
Property Value
Methods
LateSimulate()
Completes deferred pure 2D collision, response, and bookkeeping work.
public void LateSimulate()
Reset()
Clears all context-local pure 2D registration and solver state.
public void Reset()
Simulate()
Runs the authoritative pure 2D simulation phase.
public void Simulate()
Visualize()
Publishes interpolated presentation state for registered 2D bodies.
public void Visualize()