Package jolt.physics

Class PhysicsSystem

All Implemented Interfaces:
Deletable, JoltNative

public final class PhysicsSystem extends DeletableJoltNative
PhysicsSystem relies on preview features of the Java platform:
  • PhysicsSystem refers to one or more preview APIs: MemoryAddress.
Programs can only use PhysicsSystem when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
  • Method Details

    • at

      public static PhysicsSystem at(MemoryAddressPREVIEW addr)
    • of

      public static PhysicsSystem of(int maxBodies, int numBodyMutexes, int maxBodyPairs, int maxContactConstraints, BroadPhaseLayerInterface broadPhaseLayerInterface, ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, ObjectLayerPairFilter objectLayerPairFilter)
    • deleteInternal

      protected void deleteInternal()
      Specified by:
      deleteInternal in class DeletableJoltNative
    • setBodyActivationListener

      public void setBodyActivationListener(@Nullable BodyActivationListener listener)
    • getBodyActivationListener

      @Nullable public BodyActivationListener getBodyActivationListener()
    • setContactListener

      public void setContactListener(@Nullable ContactListener listener)
    • getContactListener

      @Nullable public ContactListener getContactListener()
    • setPhysicsSettings

      public void setPhysicsSettings(PhysicsSettings settings)
    • getPhysicsSettings

      public void getPhysicsSettings(PhysicsSettings out)
    • getBodyInterface

      public BodyInterface getBodyInterface()
    • getBodyInterfaceNoLock

      public BodyInterface getBodyInterfaceNoLock()
    • getBroadPhaseQuery

      public BroadPhaseQuery getBroadPhaseQuery()
    • getNarrowPhaseQuery

      public NarrowPhaseQuery getNarrowPhaseQuery()
    • getNarrowPhaseQueryNoLock

      public NarrowPhaseQuery getNarrowPhaseQueryNoLock()
    • addConstraint

      public void addConstraint(Constraint constraint)
    • addConstraints

      public void addConstraints(Constraint[] constraints)
    • addConstraints

      public void addConstraints(Collection<? extends Constraint> constraints)
    • removeConstraint

      public void removeConstraint(Constraint constraint)
    • removeConstraints

      public void removeConstraints(Constraint[] constraints)
    • removeConstraints

      public void removeConstraints(Collection<? extends Constraint> constraints)
    • optimizeBroadPhase

      public void optimizeBroadPhase()
    • addStepListener

      public void addStepListener(PhysicsStepListener listener)
    • removeStepListener

      public void removeStepListener(PhysicsStepListener listener)
    • setGravity

      public void setGravity(FVec3 gravity)
    • getGravity

      public void getGravity(FVec3 out)
    • getBodyLockInterfaceNoLock

      public BodyLockInterface getBodyLockInterfaceNoLock()
    • getBodyLockInterface

      public BodyLockInterface getBodyLockInterface()
    • getNumBodies

      public int getNumBodies()
    • getNumActiveBodies

      public int getNumActiveBodies()
    • getMaxBodies

      public int getMaxBodies()
    • getBodies

      public int[] getBodies()
    • getActiveBodies

      public int[] getActiveBodies()
    • wereBodiesInContact

      public boolean wereBodiesInContact(int bodyId1, int bodyId2)
    • update

      public void update(float deltaTime, int collisionSteps, int integrationSubSteps, TempAllocator tempAllocator, JobSystem jobSystem)