Package foundry.veil.api.util
Class CatmulRomSpline
java.lang.Object
foundry.veil.api.util.CatmulRomSpline
Generates a spline from control points without allocating new objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterable
<org.joml.Vector3dc> generateJomlSpline
(Collection<? extends org.joml.Vector3dc> controlPoints, int numSegments) Iterates through every point, generating intermediate catmul-rom spline segments.Iterable
<org.joml.Vector3dc> generateSpline
(Collection<? extends net.minecraft.core.Position> controlPoints, int numSegments) Iterates through every point, generating intermediate catmul-rom spline segments.
-
Constructor Details
-
CatmulRomSpline
public CatmulRomSpline()
-
-
Method Details
-
generateJomlSpline
public Iterable<org.joml.Vector3dc> generateJomlSpline(Collection<? extends org.joml.Vector3dc> controlPoints, int numSegments) Iterates through every point, generating intermediate catmul-rom spline segments.- Parameters:
controlPoints
- The control pointsnumSegments
- The number of segments to split into- Returns:
- An Iterable with all points
-
generateSpline
public Iterable<org.joml.Vector3dc> generateSpline(Collection<? extends net.minecraft.core.Position> controlPoints, int numSegments) Iterates through every point, generating intermediate catmul-rom spline segments.- Parameters:
controlPoints
- The control pointsnumSegments
- The number of segments to split into- Returns:
- An Iterable with all points
-