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 timetransform- positionscale- scalerotation- rotation
- All Implemented Interfaces:
Comparable<Timed>,Timed
public record AnimationMovement(float time, @Nullable org.joml.Vector3f transform, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Vector3f rotation)
extends Record
implements Timed
A movement of animation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnimationMovement(float time) AnimationMovement(float time, @Nullable org.joml.Vector3f transform, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Vector3f rotation) Creates an instance of aAnimationMovementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull AnimationMovementminus(@NotNull AnimationMovement other) Subtracts other movement.@NotNull AnimationMovementplus(@NotNull AnimationMovement other) Adds other movement.@Nullable org.joml.Vector3frotation()Returns the value of therotationrecord component.@Nullable org.joml.Vector3fscale()Returns the value of thescalerecord component.floattime()Returns the value of thetimerecord component.@NotNull AnimationMovementtime(float newTime) Sets keyframe time.final StringtoString()Returns a string representation of this record class.@Nullable org.joml.Vector3fReturns the value of thetransformrecord component.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
AnimationMovement
public AnimationMovement(float time) -
AnimationMovement
public AnimationMovement(float time, @Nullable @Nullable org.joml.Vector3f transform, @Nullable @Nullable org.joml.Vector3f scale, @Nullable @Nullable org.joml.Vector3f rotation) Creates an instance of aAnimationMovementrecord class.
-
-
Method Details
-
time
Sets keyframe time.- Parameters:
newTime- new time- Returns:
- new movement
-
plus
Adds other movement.- Parameters:
other- other movement- Returns:
- new movement
-
minus
Subtracts other movement.- Parameters:
other- other movement- Returns:
- new movement
-
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. -
transform
@Nullable public @Nullable org.joml.Vector3f transform()Returns the value of thetransformrecord component.- Returns:
- the value of the
transformrecord 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
-