Record Class VectorPoint

java.lang.Object
java.lang.Record
kr.toxicity.model.api.animation.VectorPoint
Record Components:
function - function
time - time
interpolator - interpolator
All Implemented Interfaces:
Comparable<Timed>, Timed

public record VectorPoint(@NotNull FloatFunction<org.joml.Vector3f> function, float time, @NotNull VectorPoint.BezierConfig bezier, @NotNull VectorInterpolator interpolator) extends Record implements Timed
Vector point
  • Field Details

    • EMPTY

      public static final VectorPoint EMPTY
      Empty point
  • Constructor Details

    • VectorPoint

      public VectorPoint(@NotNull @NotNull FloatFunction<org.joml.Vector3f> function, float time, @NotNull @NotNull VectorPoint.BezierConfig bezier, @NotNull @NotNull VectorInterpolator interpolator)
      Creates an instance of a VectorPoint record class.
      Parameters:
      function - the value for the function record component
      time - the value for the time record component
      bezier - the value for the bezier record component
      interpolator - the value for the interpolator record component
  • Method Details

    • vector

      @NotNull public @NotNull org.joml.Vector3f vector(float time)
      Gets vector by time
      Parameters:
      time - time
      Returns:
      vector
    • isContinuous

      public boolean isContinuous()
      Checks this vector point is continuous
      Returns:
      is continuous
    • vector

      @NotNull public @NotNull org.joml.Vector3f vector()
      Gets vector
      Returns:
      vector
    • equals

      public 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.
    • hashCode

      public 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
    • 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
    • function

      @NotNull public @NotNull FloatFunction<org.joml.Vector3f> function()
      Returns the value of the function record component.
      Returns:
      the value of the function record component
    • 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
    • bezier

      @NotNull public @NotNull VectorPoint.BezierConfig bezier()
      Returns the value of the bezier record component.
      Returns:
      the value of the bezier record component
    • interpolator

      @NotNull public @NotNull VectorInterpolator interpolator()
      Returns the value of the interpolator record component.
      Returns:
      the value of the interpolator record component