public class PiecewiseBezierFunction extends SupportPointFunction
SupportPointFunction.SupportPointComperator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BEZIER_NAME
name identifying a this kind of function
|
Constructor and Description |
---|
PiecewiseBezierFunction(java.util.ArrayList<SupportPoint> points,
float stiffness)
Default Constructor
|
PiecewiseBezierFunction(PiecewiseBezierFunction source)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addSupportPoint(float x,
float y)
Add a new SupportPoint at the given position.
|
IFunction |
copy() |
java.lang.String |
getName()
Returns the name of the function
|
void |
initialize()
Called after changes to support points.
|
double |
value(double t)
Returns the value at the passed x coordinate.
|
getDefinitionRange, getMaxX, getMaxY, getMinX, getMinY, getStiffness, getSupportPoint, getSupportPointsInArea, getSupportPointSize, hasSupportPointInArea, hasSupportPointsInArea, indexOf, mirrorYFunction, moveFunction, moveSupportPoint, moveSupportPoint, moveSupportPointTo, moveSupportPointTo, moveTangentPointAfterTo, moveTangentPointBeforeTo, removeSupportPoint, rescaleXRange, toCSVString
public static final java.lang.String BEZIER_NAME
public PiecewiseBezierFunction(java.util.ArrayList<SupportPoint> points, float stiffness)
public PiecewiseBezierFunction(PiecewiseBezierFunction source)
source
- Source object to copypublic java.lang.String getName()
IFunction
public int addSupportPoint(float x, float y)
IFunction
addSupportPoint
in interface IFunction
addSupportPoint
in class SupportPointFunction
x
- - the x coordinate of the new SupportPointy
- - the y coordinate of the new SupportPointpublic double value(double t)
t
- the coordinate at which to return the functions valuepublic void initialize()
SupportPointFunction
initialize
in class SupportPointFunction
public IFunction copy()
IFunction.copy()