Record Class Track.Key

java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.client.armature.anim.Track.Key
Enclosing class:
Track

public static record Track.Key(float time, MolangExpr[] pre, MolangExpr[] post, Track.Interp interp, float @Nullable [] bezierLeftTime, float @Nullable [] bezierLeftValue, float @Nullable [] bezierRightTime, float @Nullable [] bezierRightValue) extends Record
One keyframe. pre is the value coming in and post going out; they differ only where the curve jumps. Bezier handles are offsets from the keyframe, per axis, in seconds and in the channel's units.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Key(float time, MolangExpr[] pre, MolangExpr[] post, Track.Interp interp, float @Nullable [] bezierLeftTime, float @Nullable [] bezierLeftValue, float @Nullable [] bezierRightTime, float @Nullable [] bezierRightValue)
    Creates an instance of a Key record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float @Nullable []
    Returns the value of the bezierLeftTime record component.
    float @Nullable []
    Returns the value of the bezierLeftValue record component.
    float @Nullable []
    Returns the value of the bezierRightTime record component.
    float @Nullable []
    Returns the value of the bezierRightValue record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the interp record component.
    static Track.Key
    of(float time, MolangExpr[] value, Track.Interp interp)
     
    Returns the value of the post record component.
    pre()
    Returns the value of the pre record component.
    float
    Returns the value of the time record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Key

      public Key(float time, MolangExpr[] pre, MolangExpr[] post, Track.Interp interp, float @Nullable [] bezierLeftTime, float @Nullable [] bezierLeftValue, float @Nullable [] bezierRightTime, float @Nullable [] bezierRightValue)
      Creates an instance of a Key record class.
      Parameters:
      time - the value for the time record component
      pre - the value for the pre record component
      post - the value for the post record component
      interp - the value for the interp record component
      bezierLeftTime - the value for the bezierLeftTime record component
      bezierLeftValue - the value for the bezierLeftValue record component
      bezierRightTime - the value for the bezierRightTime record component
      bezierRightValue - the value for the bezierRightValue record component
  • Method Details

    • of

      public static Track.Key of(float time, MolangExpr[] value, Track.Interp interp)
    • 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 the compare method from their corresponding wrapper classes.
      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.
      Returns:
      the value of the time record component
    • pre

      public MolangExpr[] pre()
      Returns the value of the pre record component.
      Returns:
      the value of the pre record component
    • post

      public MolangExpr[] post()
      Returns the value of the post record component.
      Returns:
      the value of the post record component
    • interp

      public Track.Interp interp()
      Returns the value of the interp record component.
      Returns:
      the value of the interp record component
    • bezierLeftTime

      public float @Nullable [] bezierLeftTime()
      Returns the value of the bezierLeftTime record component.
      Returns:
      the value of the bezierLeftTime record component
    • bezierLeftValue

      public float @Nullable [] bezierLeftValue()
      Returns the value of the bezierLeftValue record component.
      Returns:
      the value of the bezierLeftValue record component
    • bezierRightTime

      public float @Nullable [] bezierRightTime()
      Returns the value of the bezierRightTime record component.
      Returns:
      the value of the bezierRightTime record component
    • bezierRightValue

      public float @Nullable [] bezierRightValue()
      Returns the value of the bezierRightValue record component.
      Returns:
      the value of the bezierRightValue record component