Record Class BezierInterpolator

java.lang.Object
java.lang.Record
kr.toxicity.model.api.util.interpolator.BezierInterpolator
All Implemented Interfaces:
VectorInterpolator

@Internal public record BezierInterpolator(@Nullable org.joml.Vector3f bezierLeftTime, @Nullable org.joml.Vector3f bezierLeftValue, @Nullable org.joml.Vector3f bezierRightTime, @Nullable org.joml.Vector3f bezierRightValue) extends Record implements VectorInterpolator
Bezier interpolator
  • Constructor Summary

    Constructors
    Constructor
    Description
    BezierInterpolator(@Nullable org.joml.Vector3f bezierLeftTime, @Nullable org.joml.Vector3f bezierLeftValue, @Nullable org.joml.Vector3f bezierRightTime, @Nullable org.joml.Vector3f bezierRightValue)
    Creates an instance of a BezierInterpolator record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.joml.Vector3f
    Returns the value of the bezierLeftTime record component.
    @Nullable org.joml.Vector3f
    Returns the value of the bezierLeftValue record component.
    @Nullable org.joml.Vector3f
    Returns the value of the bezierRightTime record component.
    @Nullable org.joml.Vector3f
    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.
    @NotNull org.joml.Vector3f
    interpolate(@NotNull List<VectorPoint> points, int p2Index, float time)
    Interpolates vector
    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.util.interpolator.VectorInterpolator

    isContinuous
  • Constructor Details

    • BezierInterpolator

      public BezierInterpolator(@Nullable @Nullable org.joml.Vector3f bezierLeftTime, @Nullable @Nullable org.joml.Vector3f bezierLeftValue, @Nullable @Nullable org.joml.Vector3f bezierRightTime, @Nullable @Nullable org.joml.Vector3f bezierRightValue)
      Creates an instance of a BezierInterpolator record class.
      Parameters:
      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

    • interpolate

      @NotNull public @NotNull org.joml.Vector3f interpolate(@NotNull @NotNull List<VectorPoint> points, int p2Index, float time)
      Description copied from interface: VectorInterpolator
      Interpolates vector
      Specified by:
      interpolate in interface VectorInterpolator
      Parameters:
      points - points
      p2Index - p2 index
      time - destination time
      Returns:
      interpolated vector
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • bezierLeftTime

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

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

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

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