math.geom2d.spline
Class PolyCubicBezierCurve2D

Package class diagram package PolyCubicBezierCurve2D
java.lang.Object
  extended by math.geom2d.curve.CurveSet2D<T>
      extended by math.geom2d.curve.CurveArray2D<T>
          extended by math.geom2d.curve.PolyCurve2D<CubicBezierCurve2D>
              extended by math.geom2d.spline.PolyCubicBezierCurve2D
All Implemented Interfaces:
Serializable, Cloneable, Iterable<CubicBezierCurve2D>, ContinuousCurve2D, Curve2D, Shape2D

public class PolyCubicBezierCurve2D
extends PolyCurve2D<CubicBezierCurve2D>

A set of Bezier curves, making a continuous curve.

Author:
dlegland
See Also:
Serialized Form

Field Summary
 
Fields inherited from class math.geom2d.curve.PolyCurve2D
closed
 
Fields inherited from class math.geom2d.curve.CurveSet2D
curves
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Constructor Summary
PolyCubicBezierCurve2D()
           
PolyCubicBezierCurve2D(Collection<CubicBezierCurve2D> curves)
           
PolyCubicBezierCurve2D(CubicBezierCurve2D[] curves)
           
PolyCubicBezierCurve2D(int n)
           
 
Method Summary
 PolyCubicBezierCurve2D clip(Box2D box)
          Returns a new PolyCubicBezierCurve2D.
static PolyCubicBezierCurve2D create(Point2D[] points)
          Creates a series a cubic bezier curves, by grouping 4 adjacent points.
static PolyCubicBezierCurve2D create(Point2D[] points, Vector2D[] vectors)
          Creates a series a cubic bezier curves, by grouping consecutive couples of points and vectors.
 PolyCubicBezierCurve2D transform(AffineTransform2D trans)
          Transforms each curve, and build a new CurveArray2D with the set of transformed curves.
 
Methods inherited from class math.geom2d.curve.PolyCurve2D
appendPath, draw, equals, getAsPolyline, getContinuousCurves, getGeneralPath, getLeftTangent, getReverseCurve, getRightTangent, getSmoothPieces, getSubCurve, isClosed, setClosed, wrapCurve
 
Methods inherited from class math.geom2d.curve.CurveArray2D
addCurve, clearCurves, clone, contains, contains, containsCurve, getAsAWTShape, getBoundingBox, getChildCurve, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGlobalPosition, getIntersections, getLastCurve, getLastPoint, getLocalPosition, getPoint, getPosition, getSingularPoints, getT0, getT1, isBounded, isEmpty, isSingular, iterator, project, removeCurve
 
Methods inherited from class math.geom2d.curve.CurveSet2D
fromUnitSegment, toUnitSegment
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface math.geom2d.curve.Curve2D
clone, getAsAWTShape, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project
 
Methods inherited from interface math.geom2d.Shape2D
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
 

Constructor Detail

PolyCubicBezierCurve2D

public PolyCubicBezierCurve2D()

PolyCubicBezierCurve2D

public PolyCubicBezierCurve2D(int n)

PolyCubicBezierCurve2D

public PolyCubicBezierCurve2D(CubicBezierCurve2D[] curves)

PolyCubicBezierCurve2D

public PolyCubicBezierCurve2D(Collection<CubicBezierCurve2D> curves)
Method Detail

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 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: CurveArray2D
Transforms each curve, and build a new CurveArray2D with the set of transformed curves.

Specified by:
transform in interface ContinuousCurve2D
Specified by:
transform in interface Curve2D
Specified by:
transform in interface Shape2D
Overrides:
transform in class PolyCurve2D<CubicBezierCurve2D>
Parameters:
trans - an affine transform
Returns:
the transformed shape


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.