Class StateRecorder

All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<ConstJoltPhysicsObject>
Direct Known Subclasses:
StateRecorderImpl

public class StateRecorder extends NonCopyable
Record the state of a physics system. Can also compare against an expected state.
  • Method Details

    • isValidating

      public boolean isValidating()
      Test whether the recorder is validating.
      Returns:
      true if validating, otherwise false
    • readBoolean

      public boolean readBoolean(boolean b)
      Read a boolean.
      Parameters:
      b - the value for validation
      Returns:
      the value that was read
    • readFloat

      public float readFloat(float f)
      Read a single-precision floating-point value.
      Parameters:
      f - the value for validation
      Returns:
      the value that was read
    • readInt

      public int readInt(int i)
      Read a 32-bit integer value.
      Parameters:
      i - the value for validation
      Returns:
      the value that was read
    • readVec3

      public void readVec3(Vec3 inOut)
      Read a vector.
      Parameters:
      inOut - the value for validation (not null, modified)
    • setValidating

      public void setValidating(boolean setting)
      Alter whether the recorder is validating.
      Parameters:
      setting - true to begin validating, false to stop validating
    • write

      public void write(boolean b)
      Write the specified boolean value.
      Parameters:
      b - the value to write
    • write

      public void write(float f)
      Write the specified single-precision floating-point value.
      Parameters:
      f - the value to write
    • write

      public void write(int i)
      Write the specified 32-bit integer value.
      Parameters:
      i - the value to write
    • write

      public void write(Vec3Arg v)
      Write the value of the specified vector.
      Parameters:
      v - the vector to write (not null, unaffected)