Record Class AnimationMovement

java.lang.Object
java.lang.Record
kr.toxicity.model.api.animation.AnimationMovement
Record Components:
time - keyframe time
position - position
scale - scale
rotation - rotation
globalRotation - global rotation
skipInterpolation - 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
    Modifier and Type
    Field
    Description
    static final AnimationMovement
    Empty movement
  • Constructor Summary

    Constructors
    Constructor
    Description
    AnimationMovement(float time)
    Creates empty animation movement
    AnimationMovement(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 a AnimationMovement record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets empty movement
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the globalRotation record component.
    final int
    Returns a hash code value for this object.
    boolean
    Checks this movement has some keyframe
    @Nullable org.joml.Vector3f
    Returns the value of the position record component.
    @Nullable org.joml.Vector3f
    Returns the value of the rotation record component.
    @Nullable org.joml.Vector3f
    Returns the value of the scale record component.
    boolean
    Returns the value of the skipInterpolation record component.
    float
    Returns the value of the time record component.
    final String
    Returns a string representation of this record class.
    static @NotNull @Unmodifiable List<AnimationMovement>
    withEmpty(float length)
    Gets empty movement list

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

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

    compareTo
  • Field Details

  • 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 a AnimationMovement record class.
      Parameters:
      time - the value for the time record component
      position - the value for the position record component
      scale - the value for the scale record component
      rotation - the value for the rotation record component
      globalRotation - the value for the globalRotation record component
      skipInterpolation - the value for the skipInterpolation record component
  • Method Details

    • withEmpty

      @NotNull public static @NotNull @Unmodifiable List<AnimationMovement> withEmpty(float length)
      Gets empty movement list
      Parameters:
      length - length
      Returns:
      empty keyframes
    • empty

      @NotNull public @NotNull AnimationMovement empty()
      Gets empty movement
      Returns:
      empty movement
    • hasKeyframe

      public boolean hasKeyframe()
      Checks this movement has some keyframe
      Returns:
      has keyframe
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • time

      public float time()
      Returns the value of the time record component.
      Specified by:
      time in interface Timed
      Returns:
      the value of the time record component
    • position

      @Nullable public @Nullable org.joml.Vector3f position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • scale

      @Nullable public @Nullable org.joml.Vector3f scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • rotation

      @Nullable public @Nullable org.joml.Vector3f rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • globalRotation

      public boolean globalRotation()
      Returns the value of the globalRotation record component.
      Returns:
      the value of the globalRotation record component
    • skipInterpolation

      public boolean skipInterpolation()
      Returns the value of the skipInterpolation record component.
      Returns:
      the value of the skipInterpolation record component