Klasse BezierSpline

java.lang.Object
de.luckymcdev.foundryengine.common.easing.BezierSpline

public class BezierSpline extends Object
Represents a cubic Bézier spline with control points and coefficients. Provides interpolation and rendering functionality.
  • Felddetails

  • Konstruktordetails

    • BezierSpline

      public BezierSpline(net.minecraft.world.phys.Vec3 v1, net.minecraft.world.phys.Vec3 v1_tangent, net.minecraft.world.phys.Vec3 v2_tangent, net.minecraft.world.phys.Vec3 v2, BezierPath path)
    • BezierSpline

      public BezierSpline(BezierSpline prevSpline, net.minecraft.world.phys.Vec3 v1_tangent, net.minecraft.world.phys.Vec3 v2_tangent, net.minecraft.world.phys.Vec3 v2, BezierPath path)
    • BezierSpline

      public BezierSpline(net.minecraft.world.phys.Vec3 initialPos, BezierPath owner)
    • BezierSpline

      public BezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.phys.Vec3 newEnd)
    • BezierSpline

      public BezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.entity.player.Player player, boolean startAtPlayer)
    • BezierSpline

      public BezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.entity.player.Player player)
  • Methodendetails

    • isSinglePoint

      public boolean isSinglePoint()
      Returns true if this spline consists of a single point.
    • containsPoint

      public boolean containsPoint(BezierPoint point)
      Returns true if this spline contains the given point.
    • updateCoeffs

      public void updateCoeffs()
      Updates the cubic Bézier coefficients. Only recalculates if the spline is not a single point.
    • lerp

      public net.minecraft.world.phys.Vec3 lerp(double t)
      Interpolates a position on the spline at parameter t (0 to 1). Uses cubic Bézier curve formula: B(t) = (1-t)³P0 + 3(1-t)²tP1 + 3(1-t)t²P2 + t³P3
    • derivative

      public net.minecraft.world.phys.Vec3 derivative(double t)
      Gets the derivative (tangent) of the spline at parameter t. Used for calculating arc length and velocity.
    • getLength

      public double getLength()
      Returns the approximate length of this spline segment.