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
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) 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)
    Creates an instance of a AnimationMovement record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @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.
    float
    Returns the value of the time record component.
    time(float newTime)
    Sets keyframe time.
    final String
    Returns a string representation of this record class.

    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)
      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
  • Method Details

    • time

      @NotNull public @NotNull AnimationMovement time(float newTime)
      Sets keyframe time.
      Parameters:
      newTime - new time
      Returns:
      new movement
    • 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