public class Curve
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Curve()
Initialize a new instance of the Curve class.
|
Curve(Curve curve)
Initialize a new instance of the Curve class.
|
Curve(float[] x,
float[] y)
Initialize a new instance of the Curve class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(float kx,
float ky)
Add point in the curve.
|
void |
addPoint(FloatPoint point)
Add point in the curve.
|
void |
addPoint(java.util.List<FloatPoint> points)
Add collection of points.
|
void |
clear()
Clear all the points.
|
float[] |
getX()
Get value of the x axis coordinates.
|
float[] |
getY()
Get value of the y axis coordinates.
|
int[] |
makeLut()
Create LUT.
|
void |
removePoint(int index)
Remove point
|
void |
setX(float[] x)
Set values of the x axis coordinates.
|
void |
setXY(float[] x,
float[] y)
Set the values.
|
void |
setY(float[] y)
Set value of the y axis coordinates.
|
static float |
Spline(float x,
int numKnots,
float[] knots)
Compute a Catmull-Rom spline.
|
static float |
Spline(float x,
int numKnots,
int[] xknots,
int[] yknots)
Compute a Catmull-Rom spline, but with variable knot spacing.
|
public Curve()
public Curve(Curve curve)
curve - Curve.public Curve(float[] x,
float[] y)
x - X points.y - Y points.public float[] getX()
public void setX(float[] x)
x - X axis coordinates.public float[] getY()
public void setY(float[] y)
y - Y axis coordinates.public void setXY(float[] x,
float[] y)
x - X axis coordinates.y - Y axis coordinates.public void addPoint(java.util.List<FloatPoint> points)
points - Points.public void addPoint(FloatPoint point)
point - Point.public void addPoint(float kx,
float ky)
kx - X axis coordinate.ky - Y axis coordinate.public void removePoint(int index)
index - Index.public void clear()
public int[] makeLut()
public static float Spline(float x,
int numKnots,
float[] knots)
x - the input parameternumKnots - the number of knots in the splineknots - the array of knotspublic static float Spline(float x,
int numKnots,
int[] xknots,
int[] yknots)
x - the input parameternumKnots - the number of knots in the splinexknots - the array of knot x valuesyknots - the array of knot y values