Package com.github.stephengold.joltjni
Class StateRecorderFilter
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.StateRecorderFilter
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Determine which parts of a physics system should be saved.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldSaveBody(ConstBody body) Test whether the specified body should be saved.booleanshouldSaveConstraint(ConstConstraint constraint) The whether the specified constraint should be saved.booleanshouldSaveContact(ConstBodyId bodyId1, ConstBodyId bodyId2) Test whether contacts between the specified bodies should be saved.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Method Details
-
shouldSaveBody
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
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
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
-