public class SplineFunction extends SupportPointFunction
SupportPointFunction.SupportPointComperator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SPLINE_NAME
name identifying a spline
|
Constructor and Description |
---|
SplineFunction(java.util.ArrayList<SupportPoint> points,
float stiffness)
Creates a Spline Function with the given SupportPoints.
|
SplineFunction(double[] xValues,
double[] yValues,
float stiffness)
Creates a Spline Function with the given SupportPoints.
|
Modifier and Type | Method and Description |
---|---|
IFunction |
copy() |
java.lang.String |
getName()
Returns the name of the function
|
void |
initialize()
Creates a spline function from the previously set x and y values
|
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveTangentPointAfterTo(int index,
float x,
float y) |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
moveTangentPointBeforeTo(int index,
float x,
float y) |
double |
value(double t)
Returns the spline value at t.
|
addSupportPoint, getDefinitionRange, getMaxX, getMaxY, getMinX, getMinY, getStiffness, getSupportPoint, getSupportPointsInArea, getSupportPointSize, hasSupportPointInArea, hasSupportPointsInArea, indexOf, mirrorYFunction, moveFunction, moveSupportPoint, moveSupportPoint, moveSupportPointTo, moveSupportPointTo, removeSupportPoint, rescaleXRange, toCSVString
public static final java.lang.String SPLINE_NAME
public SplineFunction(double[] xValues, double[] yValues, float stiffness)
public SplineFunction(java.util.ArrayList<SupportPoint> points, float stiffness)
public java.lang.String getName()
IFunction
public void initialize() throws java.lang.IllegalArgumentException
initialize
in class SupportPointFunction
java.lang.IllegalArgumentException
public double value(double t)
t
- the coordinate at which to return the functions valuepublic IFunction copy()
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointBeforeTo(int index, float x, float y)
moveTangentPointBeforeTo
in interface IFunction
moveTangentPointBeforeTo
in class SupportPointFunction
index
- - the index of the SupportPoint which tangent point before
should be movedx
- - the new x coordinate of the SupportPoint tangent point beforey
- - the new y coordinate of the SupportPoint tangent point beforepublic org.apache.commons.math3.geometry.euclidean.twod.Vector2D moveTangentPointAfterTo(int index, float x, float y)
moveTangentPointAfterTo
in interface IFunction
moveTangentPointAfterTo
in class SupportPointFunction
index
- - the index of the SupportPoint which tangent point after
should be movedx
- - the new x coordinate of the SupportPoint tangent point aftery
- - the new y coordinate of the SupportPoint tangent point after