math.geom2d.spline
Class PolyCubicBezierCurve2D
java.lang.Object
math.geom2d.curve.CurveArray2D<T>
math.geom2d.curve.PolyCurve2D<CubicBezierCurve2D>
math.geom2d.spline.PolyCubicBezierCurve2D
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable<CubicBezierCurve2D>, ContinuousCurve2D, Curve2D, CurveSet2D<CubicBezierCurve2D>, GeometricObject2D, Shape2D, ShapeSet2D<CubicBezierCurve2D>
public class PolyCubicBezierCurve2D
- extends PolyCurve2D<CubicBezierCurve2D>
A set of Bezier curves that forms a continuous curve.
- Author:
- dlegland
Methods inherited from class math.geom2d.curve.PolyCurve2D |
appendPath, asPolyline, continuousCurves, create, create, create, create, createClosed, curvature, draw, equals, getGeneralPath, isClosed, leftTangent, reverse, rightTangent, setClosed, smoothPieces, subCurve |
Methods inherited from class math.geom2d.curve.CurveArray2D |
add, add, almostEquals, asAwtShape, boundingBox, childCurve, clear, clone, contains, contains, contains, curveIndex, curves, distance, distance, firstCurve, firstPoint, get, getT0, getT1, globalPosition, indexOf, intersections, isBounded, isEmpty, isSingular, iterator, lastCurve, lastPoint, localPosition, point, position, project, remove, remove, singularPoints, size, t0, t1, vertices |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface math.geom2d.curve.Curve2D |
asAwtShape, clone, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, singularPoints, t0, t1, vertices |
PolyCubicBezierCurve2D
public PolyCubicBezierCurve2D()
PolyCubicBezierCurve2D
public PolyCubicBezierCurve2D(int n)
PolyCubicBezierCurve2D
public PolyCubicBezierCurve2D(CubicBezierCurve2D... curves)
PolyCubicBezierCurve2D
public PolyCubicBezierCurve2D(java.util.Collection<CubicBezierCurve2D> curves)
create
public static final PolyCubicBezierCurve2D create(Point2D... points)
- Creates a series a cubic bezier curves, by grouping 4 adjacent points.
Two consecutive curves share one point, N curves will require 3*n+1
points.
create
public static final PolyCubicBezierCurve2D create(Point2D[] points,
Vector2D[] vectors)
- Creates a series a cubic bezier curves, by grouping consecutive couples
of points and vectors. A polycurve composed of N Bezier curves requires
N+1 points and N+1 vectors.
clip
public CurveSet2D<? extends PolyCubicBezierCurve2D> clip(Box2D box)
- Returns a new PolyCubicBezierCurve2D.
- Specified by:
clip
in interface ContinuousCurve2D
- Specified by:
clip
in interface Curve2D
- Specified by:
clip
in interface Shape2D
- Overrides:
clip
in class PolyCurve2D<CubicBezierCurve2D>
- Parameters:
box
- the clipping box
- Returns:
- the clipped shape
transform
public PolyCubicBezierCurve2D transform(AffineTransform2D trans)
- Description copied from class:
PolyCurve2D
- Transforms each smooth piece in this PolyCurve2D and returns a new
instance of PolyCurve2D.
- Specified by:
transform
in interface ContinuousCurve2D
- Specified by:
transform
in interface Curve2D
- Specified by:
transform
in interface CurveSet2D<CubicBezierCurve2D>
- Specified by:
transform
in interface Shape2D
- Overrides:
transform
in class PolyCurve2D<CubicBezierCurve2D>
- Parameters:
trans
- an affine transform
- Returns:
- the transformed shape