math.geom2d.curve
Interface ContinuousCurve2D

Package class diagram package ContinuousCurve2D
All Superinterfaces:
Cloneable, Curve2D, Serializable, Shape2D
All Known Subinterfaces:
CircleLine2D, CircularShape2D, CirculinearContinuousCurve2D, CirculinearContour2D, CirculinearElement2D, CirculinearRing2D, ContinuousBoundary2D, ContinuousCirculinearCurve2D, ContinuousOrientedCurve2D, SmoothBoundary2D, SmoothCurve2D, SmoothOrientedCurve2D
All Known Implementing Classes:
AbstractContinuousCurve2D, AbstractLine2D, AbstractSmoothCurve2D, BezierCurve2D, BoundaryPolyCirculinearCurve2D, BoundaryPolyCurve2D, Circle2D, CircleArc2D, ClosedPolyline2D, CubicBezierCurve2D, Ellipse2D, EllipseArc2D, GenericCirculinearRing2D, HyperbolaBranch2D, HyperbolaBranchArc2D, InvertedRay2D, Line2D, LineArc2D, LinearRing2D, LineObject2D, LineSegment2D, Parabola2D, ParabolaArc2D, PolyBezierCurve2D, PolyCirculinearCurve2D, PolyCubicBezierCurve2D, PolyCurve2D, Polyline2D, Polyline2D, PolyOrientedCurve2D, QuadBezier2D, QuadBezierCurve2D, Ray2D, Ring2D, StraightLine2D

public interface ContinuousCurve2D
extends Curve2D

Interface for all curves which can be drawn with one stroke. This includes closed curves (ellipses, polygon boundaries...), infinite curves (straight lines, parabolas, ...), and 'finite' curves, such as polylines, conic arcs, line segments, splines... Note that an hyperbola is compound of 2 continuous curves.

Such curves accept parametric representation, in the form : p(t)={x(t),y(t)}, with t contained in appropriate domain. Bounds of domain of definition can be obtained by methods getT0() and getT1().


Field Summary
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Method Summary
 GeneralPath appendPath(GeneralPath path)
          Append the path of the curve to the given path.
 CurveSet2D clip(Box2D box)
          When a curve is clipped, the result is a set of curves.
 Polyline2D getAsPolyline(int n)
          Returns an approximation of the curve as a polyline with n line segments.
 Vector2D getLeftTangent(double t)
           
 Curve2D getReverseCurve()
          Returns the curve with same trace on the plane with parametrization in reverse order.
 Vector2D getRightTangent(double t)
           
 Collection<? extends SmoothCurve2D> getSmoothPieces()
          Returns a set of smooth curves.
 Curve2D getSubCurve(double t0, double t1)
          Returns a portion of the original curve, delimited by two positions on the curve.
 boolean isClosed()
          Return true if the curve makes a loop, that is come back to starting point after covering the path.
 Curve2D transform(AffineTransform2D trans)
          Transforms the curve by an affine transform.
 
Methods inherited from interface math.geom2d.curve.Curve2D
clone, draw, getAsAWTShape, getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project
 
Methods inherited from interface math.geom2d.Shape2D
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
 

Method Detail

isClosed

boolean isClosed()
Return true if the curve makes a loop, that is come back to starting point after covering the path.


getLeftTangent

Vector2D getLeftTangent(double t)

getRightTangent

Vector2D getRightTangent(double t)

getSmoothPieces

Collection<? extends SmoothCurve2D> getSmoothPieces()
Returns a set of smooth curves.


getAsPolyline

Polyline2D getAsPolyline(int n)
Returns an approximation of the curve as a polyline with n line segments. If the curve is closed, the method should return an instance of Ring2D.

Parameters:
n - the number of line segments
Returns:
a polyline with n line segments.

appendPath

GeneralPath appendPath(GeneralPath path)
Append the path of the curve to the given path.

Parameters:
path - a path to modify
Returns:
the modified path

getReverseCurve

Curve2D getReverseCurve()
Description copied from interface: Curve2D
Returns the curve with same trace on the plane with parametrization in reverse order.

Specified by:
getReverseCurve in interface Curve2D

getSubCurve

Curve2D getSubCurve(double t0,
                    double t1)
Description copied from interface: Curve2D
Returns a portion of the original curve, delimited by two positions on the curve.

Specified by:
getSubCurve in interface Curve2D
Parameters:
t0 - position of the start of the sub-curve
t1 - position of the end of the sub-curve
Returns:
the portion of original curve comprised between t0 and t1.

clip

CurveSet2D clip(Box2D box)
Description copied from interface: Curve2D
When a curve is clipped, the result is a set of curves.

Specified by:
clip in interface Curve2D
Specified by:
clip in interface Shape2D
Parameters:
box - the clipping box
Returns:
the clipped shape

transform

Curve2D transform(AffineTransform2D trans)
Description copied from interface: Curve2D
Transforms the curve by an affine transform. The result is an instance of Curve2D.

Specified by:
transform in interface Curve2D
Specified by:
transform in interface Shape2D
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.