Package kr.toxicity.model.api.util
Class InterpolationUtil
java.lang.Object
kr.toxicity.model.api.util.InterpolationUtil
Interpolation util
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic floatalpha(float p0, float p1, float alpha) static @NotNull org.joml.Vector3fbezier(float time, float startTime, float endTime, @NotNull org.joml.Vector3f startValue, @NotNull org.joml.Vector3f endValue, @Nullable org.joml.Vector3f bezierLeftTime, @Nullable org.joml.Vector3f bezierLeftValue, @Nullable org.joml.Vector3f bezierRightTime, @Nullable org.joml.Vector3f bezierRightValue) static @NotNull @Unmodifiable List<AnimationMovement> buildAnimation(@NotNull List<VectorPoint> position, @NotNull List<VectorPoint> rotation, @NotNull List<VectorPoint> scale, @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet points) static @NotNull org.joml.Vector3fcatmull_rom(@NotNull org.joml.Vector3f p0, @NotNull org.joml.Vector3f p1, @NotNull org.joml.Vector3f p2, @NotNull org.joml.Vector3f p3, float t) static floatcubicBezier(float p0, float p1, float p2, float p3, float t) static floatderivativeBezier(float p0, float p1, float p2, float p3, float t) static voidinsertLerpFrame(@NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet frames) static voidinsertLerpFrame(@NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet frames, float frame) static @NotNull InterpolationUtil.VectorPointBuilderinterpolatorFor(@NotNull List<VectorPoint> vectors) static floatlerp(float p0, float p1, float alpha) static @NotNull org.joml.Vector3flerp(@NotNull org.joml.Vector3f p0, @NotNull org.joml.Vector3f p1, float alpha) static floatroundTime(float time) static floatsolveBezierTForTime(float time, float t0, float h1, float h2, float t1)
-
Method Details
-
buildAnimation
@NotNull public static @NotNull @Unmodifiable List<AnimationMovement> buildAnimation(@NotNull @NotNull List<VectorPoint> position, @NotNull @NotNull List<VectorPoint> rotation, @NotNull @NotNull List<VectorPoint> scale, @NotNull @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet points) -
interpolatorFor
@NotNull public static @NotNull InterpolationUtil.VectorPointBuilder interpolatorFor(@NotNull @NotNull List<VectorPoint> vectors) -
insertLerpFrame
public static void insertLerpFrame(@NotNull @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet frames) -
roundTime
public static float roundTime(float time) -
insertLerpFrame
public static void insertLerpFrame(@NotNull @NotNull it.unimi.dsi.fastutil.floats.FloatSortedSet frames, float frame) -
alpha
public static float alpha(float p0, float p1, float alpha) -
lerp
@NotNull public static @NotNull org.joml.Vector3f lerp(@NotNull @NotNull org.joml.Vector3f p0, @NotNull @NotNull org.joml.Vector3f p1, float alpha) -
lerp
public static float lerp(float p0, float p1, float alpha) -
cubicBezier
public static float cubicBezier(float p0, float p1, float p2, float p3, float t) -
derivativeBezier
public static float derivativeBezier(float p0, float p1, float p2, float p3, float t) -
solveBezierTForTime
public static float solveBezierTForTime(float time, float t0, float h1, float h2, float t1) -
bezier
@NotNull public static @NotNull org.joml.Vector3f bezier(float time, float startTime, float endTime, @NotNull @NotNull org.joml.Vector3f startValue, @NotNull @NotNull org.joml.Vector3f endValue, @Nullable @Nullable org.joml.Vector3f bezierLeftTime, @Nullable @Nullable org.joml.Vector3f bezierLeftValue, @Nullable @Nullable org.joml.Vector3f bezierRightTime, @Nullable @Nullable org.joml.Vector3f bezierRightValue) -
catmull_rom
@NotNull public static @NotNull org.joml.Vector3f catmull_rom(@NotNull @NotNull org.joml.Vector3f p0, @NotNull @NotNull org.joml.Vector3f p1, @NotNull @NotNull org.joml.Vector3f p2, @NotNull @NotNull org.joml.Vector3f p3, float t)
-