Record Class AnimationProgress.EmptyProgress

java.lang.Object
java.lang.Record
kr.toxicity.model.api.animation.AnimationProgress.EmptyProgress
Record Components:
time - the time of the keyframe
All Implemented Interfaces:
Comparable<Timed>, AnimationProgress, Timed
Enclosing interface:
AnimationProgress

public static record AnimationProgress.EmptyProgress(float time) extends Record implements AnimationProgress
An implementation of AnimationProgress that represents an empty keyframe.
Since:
2.0.0
  • Constructor Details

    • EmptyProgress

      public EmptyProgress(float time)
      Creates an instance of a EmptyProgress record class.
      Parameters:
      time - the value for the time record component
  • Method Details

    • animate

      @NotNull public @NotNull BoneMovement animate(@NotNull @NotNull BoneMovement movement, @NotNull @NotNull BoneMovement dest)
      Description copied from interface: AnimationProgress
      Applies this keyframe's animation to a bone's movement.
      Specified by:
      animate in interface AnimationProgress
      Parameters:
      movement - the current bone movement
      dest - the destination object to store the result
      Returns:
      the resulting bone movement
    • toEmpty

      @NotNull public @NotNull AnimationProgress toEmpty()
      Description copied from interface: AnimationProgress
      Converts this progress to empty progress at the same time.
      Specified by:
      toEmpty in interface AnimationProgress
      Returns:
      an empty progress
    • skipInterpolation

      public boolean skipInterpolation()
      Description copied from interface: AnimationProgress
      Checks if interpolation should be skipped after this keyframe.
      Specified by:
      skipInterpolation in interface AnimationProgress
      Returns:
      true to skip interpolation, false otherwise
    • globalRotation

      public boolean globalRotation()
      Description copied from interface: AnimationProgress
      Checks if the rotation in this keyframe should be applied globally.
      Specified by:
      globalRotation in interface AnimationProgress
      Returns:
      true for global rotation, false for local
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • time

      public float time()
      Returns the value of the time record component.
      Specified by:
      time in interface Timed
      Returns:
      the value of the time record component