public class Bezier3D
extends java.lang.Object
Constructor and Description |
---|
Bezier3D(float[][] points,
int nbrPoints,
boolean useZ)
Create a Bezier object based on points passed as a 2D
array.
|
Bezier3D(processing.core.PVector[] points,
boolean useZ)
Create a Bezier object based on an array of vectors.
|
Modifier and Type | Method and Description |
---|---|
void |
force2D()
Forces the bezier to ignore the z values i.e. makes
it become 2D.
|
processing.core.PVector |
point(float t)
Calculate the point for a given parametric point 't' on the curve.
|
processing.core.PVector[] |
points(int steps)
Calculate the points along the Bezier curve.
|
public Bezier3D(float[][] points, int nbrPoints, boolean useZ)
points
- 2D array[point no.][x/y]nbrPoints
- number of points to use from arrayuseZ
- true 3D Bezier : false = 2D Bezierpublic Bezier3D(processing.core.PVector[] points, boolean useZ)
points
- array of control pointspublic void force2D()
public processing.core.PVector point(float t)
t
- public processing.core.PVector[] points(int steps)
steps
- the number of points to calculate