Package kr.toxicity.model.api.animation
Record Class AnimationMovement
java.lang.Object
java.lang.Record
kr.toxicity.model.api.animation.AnimationMovement
- Record Components:
time- keyframe timeposition- positionscale- scalerotation- rotationglobalRotation- global rotationskipInterpolation- skip interpolation
- All Implemented Interfaces:
Comparable<Timed>,Timed
public record AnimationMovement(float time, @Nullable org.joml.Vector3f position, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Vector3f rotation, boolean globalRotation, boolean skipInterpolation)
extends Record
implements Timed
A movement of animation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnimationMovement(float time) Creates empty animation movementAnimationMovement(float time, @Nullable org.joml.Vector3f position, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Vector3f rotation, boolean globalRotation, boolean skipInterpolation) Creates an instance of aAnimationMovementrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull AnimationMovementempty()Gets empty movementfinal 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.booleanChecks this movement has some keyframe@Nullable org.joml.Vector3fposition()Returns the value of thepositionrecord component.@Nullable org.joml.Vector3frotation()Returns the value of therotationrecord component.@Nullable org.joml.Vector3fscale()Returns the value of thescalerecord component.booleanReturns the value of theskipInterpolationrecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.static @NotNull @Unmodifiable List<AnimationMovement> withEmpty(float length) Gets empty movement list
-
Field Details
-
EMPTY
Empty movement
-
-
Constructor Details
-
AnimationMovement
public AnimationMovement(float time) Creates empty animation movement- Parameters:
time- time
-
AnimationMovement
public AnimationMovement(float time, @Nullable @Nullable org.joml.Vector3f position, @Nullable @Nullable org.joml.Vector3f scale, @Nullable @Nullable org.joml.Vector3f rotation, boolean globalRotation, boolean skipInterpolation) Creates an instance of aAnimationMovementrecord class.- Parameters:
time- the value for thetimerecord componentposition- the value for thepositionrecord componentscale- the value for thescalerecord componentrotation- the value for therotationrecord componentglobalRotation- the value for theglobalRotationrecord componentskipInterpolation- the value for theskipInterpolationrecord component
-
-
Method Details
-
withEmpty
Gets empty movement list- Parameters:
length- length- Returns:
- empty keyframes
-
empty
Gets empty movement- Returns:
- empty movement
-
hasKeyframe
public boolean hasKeyframe()Checks this movement has some keyframe- Returns:
- has keyframe
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
time
public float time()Returns the value of thetimerecord component. -
position
@Nullable public @Nullable org.joml.Vector3f position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
scale
@Nullable public @Nullable org.joml.Vector3f scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
rotation
@Nullable public @Nullable org.joml.Vector3f rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
globalRotation
public boolean globalRotation()Returns the value of theglobalRotationrecord component.- Returns:
- the value of the
globalRotationrecord component
-
skipInterpolation
public boolean skipInterpolation()Returns the value of theskipInterpolationrecord component.- Returns:
- the value of the
skipInterpolationrecord component
-