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
ConstructorsConstructorDescriptionBezierInterpolator(@Nullable org.joml.Vector3f bezierLeftTime, @Nullable org.joml.Vector3f bezierLeftValue, @Nullable org.joml.Vector3f bezierRightTime, @Nullable org.joml.Vector3f bezierRightValue) Creates an instance of aBezierInterpolatorrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.joml.Vector3fReturns the value of thebezierLeftTimerecord component.@Nullable org.joml.Vector3fReturns the value of thebezierLeftValuerecord component.@Nullable org.joml.Vector3fReturns the value of thebezierRightTimerecord component.@Nullable org.joml.Vector3fReturns the value of thebezierRightValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.joml.Vector3finterpolate(@NotNull List<VectorPoint> points, int p2Index, float time) Interpolates vectorfinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aBezierInterpolatorrecord class.- Parameters:
bezierLeftTime- the value for thebezierLeftTimerecord componentbezierLeftValue- the value for thebezierLeftValuerecord componentbezierRightTime- the value for thebezierRightTimerecord componentbezierRightValue- the value for thebezierRightValuerecord component
-
-
Method Details
-
interpolate
@NotNull public @NotNull org.joml.Vector3f interpolate(@NotNull @NotNull List<VectorPoint> points, int p2Index, float time) Description copied from interface:VectorInterpolatorInterpolates vector- Specified by:
interpolatein interfaceVectorInterpolator- Parameters:
points- pointsp2Index- p2 indextime- destination time- Returns:
- interpolated vector
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
bezierLeftTime
@Nullable public @Nullable org.joml.Vector3f bezierLeftTime()Returns the value of thebezierLeftTimerecord component.- Returns:
- the value of the
bezierLeftTimerecord component
-
bezierLeftValue
@Nullable public @Nullable org.joml.Vector3f bezierLeftValue()Returns the value of thebezierLeftValuerecord component.- Returns:
- the value of the
bezierLeftValuerecord component
-
bezierRightTime
@Nullable public @Nullable org.joml.Vector3f bezierRightTime()Returns the value of thebezierRightTimerecord component.- Returns:
- the value of the
bezierRightTimerecord component
-
bezierRightValue
@Nullable public @Nullable org.joml.Vector3f bezierRightValue()Returns the value of thebezierRightValuerecord component.- Returns:
- the value of the
bezierRightValuerecord component
-