Class PhysicsSystem

All Implemented Interfaces:
Behavior, Closeable, AutoCloseable

public class PhysicsSystem extends SystemBehavior
  • Constructor Details

    • PhysicsSystem

      public PhysicsSystem()
  • Method Details

    • onStart

      public void onStart()
      Description copied from interface: Behavior
      This method is called when the behavior is started. It is typically used to initialize any necessary state or resources.
      Specified by:
      onStart in interface Behavior
      Overrides:
      onStart in class SystemBehavior
    • onUpdate

      public void onUpdate(ContextTime time)
      Description copied from interface: Behavior
      This method is called when the behavior needs to be updated with the current time. It is typically used to perform any necessary calculations or updates based on the current time.
      Specified by:
      onUpdate in interface Behavior
      Overrides:
      onUpdate in class SystemBehavior
      Parameters:
      time - The current time context.
    • b2World

      public org.jbox2d.dynamics.World b2World()
    • gravity

      public Vector2D gravity()
    • setGravity

      public PhysicsSystem setGravity(Vector2D gravity)
    • velocityIterations

      public int velocityIterations()
    • setVelocityIterations

      public PhysicsSystem setVelocityIterations(int velocityIterations)
    • positionIterations

      public int positionIterations()
    • setPositionIterations

      public PhysicsSystem setPositionIterations(int positionIterations)
    • ppm

      public double ppm()
    • setPpm

      public PhysicsSystem setPpm(double ppm)