public class SplineUtil extends Object
| Constructor and Description |
|---|
SplineUtil()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
spline(CubicSpline
|
static CubicSpline |
spline(double p1x, double p1y, double p2x, double p2y, Vector2
|
static CubicSpline |
spline(Point
Create a cubic spline that connects
p1 and
p2
|
public static CubicSplinespline(Point p1, Point p2, Vector2 d1, Vector2 d2, double f, boolean normalized)
p1 and
p2
p1 - the start point of the spline
p2 - the end point of the spline
d1 - the tangent vector from the start point pointing in the direction that the curve should have at its start (towards the end point)
d2 - the tangent vector from the end point pointing in the direction that the curve should have at its end (towards the start point)
f - the fraction in [0..1] of the length of the straight line connecting start and end point that the control points should be positioned along the tangents
normalized - whether the tangent vectors are already normalized
public static CubicSplinespline(double p1x, double p1y, double p2x, double p2y, Vector2 d1, Vector2 d2, double f, boolean normalized)
public static void spline(CubicSplinespline, double p1x, double p1y, double p2x, double p2y, Vector2 d1, Vector2 d2, double f, boolean normalized)