Interface AnimationProgress

All Superinterfaces:
Comparable<Timed>, Timed
All Known Implementing Classes:
AnimationProgress.EmptyProgress

public interface AnimationProgress extends Timed
Represents the state of an animation at a specific keyframe.

This interface defines how to apply the keyframe's transformation to a bone's movement.

Since:
2.0.0
  • Field Details

    • EMPTY

      static final AnimationProgress EMPTY
      An empty animation progress that applies no transformation.
      Since:
      2.0.0
  • Method Details

    • skipInterpolation

      boolean skipInterpolation()
      Checks if interpolation should be skipped after this keyframe.
      Returns:
      true to skip interpolation, false otherwise
      Since:
      2.0.0
    • globalRotation

      boolean globalRotation()
      Checks if the rotation in this keyframe should be applied globally.
      Returns:
      true for global rotation, false for local
      Since:
      2.0.0
    • empty

      @NotNull static @NotNull AnimationProgress empty(float time)
      Creates an empty animation progress at a specific time.
      Parameters:
      time - the time of the keyframe
      Returns:
      an empty progress
      Since:
      2.0.0
    • toEmpty

      @NotNull default @NotNull AnimationProgress toEmpty()
      Converts this progress to empty progress at the same time.
      Returns:
      an empty progress
      Since:
      2.0.0
    • emptyStorage

      @NotNull static @NotNull TimedStorage<AnimationProgress> emptyStorage(float time)
      Creates an empty timed storage with a start and end keyframe.
      Parameters:
      time - the duration of the empty animation
      Returns:
      the timed storage
      Since:
      2.0.0
    • animate

      @NotNull @NotNull BoneMovement animate(@NotNull @NotNull BoneMovement movement, @NotNull @NotNull BoneMovement dest)
      Applies this keyframe's animation to a bone's movement.
      Parameters:
      movement - the current bone movement
      dest - the destination object to store the result
      Returns:
      the resulting bone movement
      Since:
      2.0.0