public class Spline
extends java.lang.Object
Title: Spline class
Description: Spline smoothing.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Constructor and Description |
---|
Spline()
Spline smoothing.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y)
Adds a new source point with specified X and Y values.
|
void |
clear()
Removes all source points.
|
boolean |
getBuild()
Indicates the spline has already calculated smooth points.
|
int |
getFragments()
The number of resulting smooth points.
Must be a multiple of source points. |
boolean |
getInterpolated()
When true, the spline calculates interpolated points that will pass
exactly over source points.
When false, the spline resulting points do not necessarily pass over source points. |
Point.Double |
getPoint(int index) |
int |
numberOfVertices()
Returns the number of total source points.
|
void |
rebuild()
Calculates new smoothed points from list of points.
|
void |
setBuild(boolean value)
Indicates the spline has already calculated smooth points.
|
void |
setFragments(int value)
Sets the number of resulting smooth points.
Must be a multiple of source points. |
void |
setInterpolated(boolean value)
When true, the spline calculates interpolated points that will pass
exactly over source points.
When false, the spline resulting points do not necessarily pass over source points. |
void |
setKnuckle(int index,
boolean value)
Makes the Index source point a control point.
|
void |
setPoint(int index,
Point.Double value)
Use to set the source point for the Knuckle
|
Point.Double |
value(double parameter)
Returns an interpolated point.
|
public boolean getBuild()
public void setBuild(boolean value)
value
- booleanpublic int getFragments()
public void setFragments(int value)
value
- intpublic boolean getInterpolated()
public void setInterpolated(boolean value)
value
- booleanpublic Point.Double getPoint(int index)
public void setPoint(int index, Point.Double value)
index
- intvalue
- Doublepublic void setKnuckle(int index, boolean value)
index
- intvalue
- booleanpublic int numberOfVertices()
public void rebuild()
public void addPoint(double x, double y)
x
- doubley
- doublepublic void clear()
public Point.Double value(double parameter)
parameter
- double