Class StateRecorderFilter

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.StateRecorderFilter
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public abstract class StateRecorderFilter extends JoltPhysicsObject
Determine which parts of a physics system should be saved.
  • Method Details

    • shouldSaveBody

      public boolean shouldSaveBody(ConstBody body)
      Test whether the specified body should be saved. Meant to be overridden.
      Parameters:
      body - the body to test (not null, unaffected)
      Returns:
      true to save, otherwise false
    • shouldSaveConstraint

      public boolean shouldSaveConstraint(ConstConstraint constraint)
      Test whether the specified constraint should be saved. Meant to be overridden.
      Parameters:
      constraint - the constraint to test (not null, unaffected)
      Returns:
      true to save, otherwise false
    • shouldSaveContact

      public boolean shouldSaveContact(int bodyId1, int bodyId2)
      Test whether contacts between the specified bodies should be saved. Meant to be overridden.
      Parameters:
      bodyId1 - the ID of first body
      bodyId2 - the ID of 2nd body
      Returns:
      true to save, otherwise false