Package kr.toxicity.model.api.animation
Interface AnimationProgress
- All Superinterfaces:
Comparable<Timed>,Timed
- All Known Implementing Classes:
AnimationProgress.EmptyProgress
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 ClassesModifier and TypeInterfaceDescriptionstatic final recordAn implementation ofAnimationProgressthat represents an empty keyframe. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AnimationProgressAn empty animation progress that applies no transformation. -
Method Summary
Modifier and TypeMethodDescription@NotNull BoneMovementanimate(@NotNull BoneMovement movement, @NotNull BoneMovement dest) Applies this keyframe's animation to a bone's movement.static @NotNull AnimationProgressempty(float time) Creates an empty animation progress at a specific time.static @NotNull TimedStorage<AnimationProgress> emptyStorage(float time) Creates an empty timed storage with a start and end keyframe.booleanChecks if the rotation in this keyframe should be applied globally.booleanChecks if interpolation should be skipped after this keyframe.default @NotNull AnimationProgresstoEmpty()Converts this progress to empty progress at the same time.
-
Field Details
-
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
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
Converts this progress to empty progress at the same time.- Returns:
- an empty progress
- Since:
- 2.0.0
-
emptyStorage
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 movementdest- the destination object to store the result- Returns:
- the resulting bone movement
- Since:
- 2.0.0
-