Record Class AnimationProgress.EmptyProgress
java.lang.Object
java.lang.Record
kr.toxicity.model.api.animation.AnimationProgress.EmptyProgress
- Record Components:
time- the time of the keyframeskipInterpolation- whether to skip interpolationglobalRotation- 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface AnimationProgress
AnimationProgress.EmptyProgress -
Field Summary
Fields inherited from interface AnimationProgress
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionEmptyProgress(float time, boolean skipInterpolation, boolean globalRotation) Creates an instance of aEmptyProgressrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull BoneMovementanimate(@NotNull BoneMovement movement, @NotNull BoneMovement dest) Applies this keyframe's animation to a bone's movement.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theglobalRotationrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theskipInterpolationrecord component.floattime()Returns the value of thetimerecord component.@NotNull AnimationProgresstoEmpty()Converts this progress to empty progress at the same time.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EmptyProgress
public EmptyProgress(float time, boolean skipInterpolation, boolean globalRotation) Creates an instance of aEmptyProgressrecord class.- Parameters:
time- the value for thetimerecord componentskipInterpolation- the value for theskipInterpolationrecord componentglobalRotation- the value for theglobalRotationrecord component
-
-
Method Details
-
animate
@NotNull public @NotNull BoneMovement animate(@NotNull @NotNull BoneMovement movement, @NotNull @NotNull BoneMovement dest) Description copied from interface:AnimationProgressApplies this keyframe's animation to a bone's movement.- Specified by:
animatein interfaceAnimationProgress- Parameters:
movement- the current bone movementdest- the destination object to store the result- Returns:
- the resulting bone movement
-
toEmpty
Description copied from interface:AnimationProgressConverts this progress to empty progress at the same time.- Specified by:
toEmptyin interfaceAnimationProgress- Returns:
- an empty progress
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
time
-
skipInterpolation
public boolean skipInterpolation()Returns the value of theskipInterpolationrecord component.- Specified by:
skipInterpolationin interfaceAnimationProgress- Returns:
- the value of the
skipInterpolationrecord component
-
globalRotation
public boolean globalRotation()Returns the value of theglobalRotationrecord component.- Specified by:
globalRotationin interfaceAnimationProgress- Returns:
- the value of the
globalRotationrecord component
-