Klasse BezierSpline
java.lang.Object
de.luckymcdev.foundryengine.common.easing.BezierSpline
Represents a cubic Bézier spline with control points and coefficients.
Provides interpolation and rendering functionality.
-
Feldübersicht
FelderModifikator und TypFeldBeschreibung -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.entity.player.Player player) BezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.entity.player.Player player, boolean startAtPlayer) BezierSpline(BezierPoint point, BezierPath owner, net.minecraft.world.phys.Vec3 newEnd) 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(net.minecraft.world.phys.Vec3 initialPos, BezierPath owner) 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) -
Methodenübersicht
Modifikator und TypMethodeBeschreibungbooleancontainsPoint(BezierPoint point) Returns true if this spline contains the given point.net.minecraft.world.phys.Vec3derivative(double t) Gets the derivative (tangent) of the spline at parameter t.doubleReturns the approximate length of this spline segment.booleanReturns true if this spline consists of a single point.net.minecraft.world.phys.Vec3lerp(double t) Interpolates a position on the spline at parameter t (0 to 1).voidUpdates the cubic Bézier coefficients.
-
Felddetails
-
v1
-
v1_tangent
-
v2
-
v2_tangent
-
path
-
points
-
-
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
-
BezierSpline
-
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
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.
-