public class JBezier
extends java.lang.Object
Constructor and Description |
---|
JBezier(BezierOrder order,
int iterations,
Point... points)
Initializes all important values for use with bézier curves
|
JBezier(int order,
int iterations,
Point... points)
Initializes all important values for use with bézier curves
|
Modifier and Type | Method and Description |
---|---|
Point[] |
generateBezier()
Generates the bezier curve and stores the individual points into an array.The amount of points is determined by the number of iterations.
|
int |
getOrder()
Returns the current order of the bézier curve
|
void |
setOrder(int neworder)
Sets a new order for the bézier curve that should be used when calling generateBezier() again (Should only be used in conjunction with the update() function).
|
Point[] |
update(Point... points)
Generates a new bézier based on the new points supplied (This takes changes of order into calculation).
|
public Point[] bPoints
public JBezier(BezierOrder order, int iterations, Point... points)
order
- The most common orders, which can be found in BezierOrder.javaiterations
- How many points should be generated.
More points = higher quality but slower computing speed;
Less points = lower quality but faster computing speedpoints
- Any amount of vertices of the type Point (can be an array)public JBezier(int order, int iterations, Point... points)
order
- Can be any integer (See "important note.txt" for details). The order is the amount of points minus 1iterations
- How many points should be generated.
More points = higher quality but slower computing speed;
Less points = lower quality but faster computing speedpoints
- Any amount of vertices of the type Point (can be an array)public Point[] generateBezier()
public void setOrder(int neworder)
neworder
- The new order that should be used when generateBezier is called againpublic int getOrder()