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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    An implementation of AnimationProgress that represents an empty keyframe.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AnimationProgress
    An empty animation progress that applies no transformation.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull BoneMovement
    animate(@NotNull BoneMovement movement, @NotNull BoneMovement dest)
    Applies this keyframe's animation to a bone's movement.
    static @NotNull AnimationProgress
    empty(float time)
    Creates an empty animation progress at a specific time.
    emptyStorage(float time)
    Creates an empty timed storage with a start and end keyframe.
    boolean
    Checks if the rotation in this keyframe should be applied globally.
    boolean
    Checks if interpolation should be skipped after this keyframe.
    default @NotNull AnimationProgress
    Converts this progress to empty progress at the same time.

    Methods inherited from interface kr.toxicity.model.api.animation.Timed

    compareTo, time
  • 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