Class StateRecorderFilter

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

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)
      The 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(ConstBodyId bodyId1, ConstBodyId bodyId2)
      Test whether contacts between the specified bodies should be saved. Meant to be overridden.
      Parameters:
      bodyId1 - the first body (not null, unaffected)
      bodyId2 - the second body (not null, unaffected)
      Returns:
      true to save, otherwise false