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
skipInterpolation - whether to skip interpolation
globalRotation - the rotation mode
All Implemented Interfaces:
Comparable<Timed>, AnimationProgress, Timed
Enclosing interface:
AnimationProgress

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

    • EmptyProgress

      public EmptyProgress(float time, boolean skipInterpolation, boolean globalRotation)
      Creates an instance of a EmptyProgress record class.
      Parameters:
      time - the value for the time record component
      skipInterpolation - the value for the skipInterpolation record component
      globalRotation - the value for the globalRotation 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
    • 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
    • skipInterpolation

      public boolean skipInterpolation()
      Returns the value of the skipInterpolation record component.
      Specified by:
      skipInterpolation in interface AnimationProgress
      Returns:
      the value of the skipInterpolation record component
    • globalRotation

      public boolean globalRotation()
      Returns the value of the globalRotation record component.
      Specified by:
      globalRotation in interface AnimationProgress
      Returns:
      the value of the globalRotation record component