math.geom2d.curve
Interface CurveSet2D<T extends Curve2D>
-
- All Superinterfaces:
- java.lang.Cloneable, Curve2D, GeometricObject2D, java.lang.Iterable<T>, Shape2D, ShapeSet2D<T>
- All Known Subinterfaces:
- CirculinearCurveSet2D<T>
- All Known Implementing Classes:
- BoundaryPolyCirculinearCurve2D, BoundaryPolyCurve2D, CirculinearContourArray2D, CirculinearCurveArray2D, ContourArray2D, CurveArray2D, GenericCirculinearRing2D, Hyperbola2D, PolyCirculinearCurve2D, PolyCubicBezierCurve2D, PolyCurve2D, PolyOrientedCurve2D
public interface CurveSet2D<T extends Curve2D> extends Curve2D, ShapeSet2D<T>
A parameterized set of curves. A curve cannot be included twice in a CurveSet2D.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description TchildCurve(double t)Returns the child curve corresponding to a given position.booleancontains(T curve)Checks if the curve set contains the given curve.intcurveIndex(double t)Returns the index of the curve corresponding to a given position.java.util.Collection<T>curves()Returns the collection of curvesTfirstCurve()Returns the first curve of the collection if it exists, null otherwise.Tget(int index)Returns the inner curve corresponding to the given index.doubleglobalPosition(int i, double t)Converts a position on a curve (between t0 and t1 of the curve) to the position on the curve set (between 0 and 2*Nc-1).TlastCurve()Returns the last curve of the collection if it exists, null otherwise.doublelocalPosition(double t)Converts the position on the curve set, which is comprised between 0 and 2*Nc-1 with Nc being the number of curves, to the position on the curve which contains the position.CurveSet2D<? extends Curve2D>transform(AffineTransform2D trans)Transforms each curve in the set and returns a new instance of CurveSet2D.-
Methods inherited from interface math.geom2d.curve.Curve2D
asAwtShape, clip, clone, continuousCurves, draw, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, reverse, singularPoints, subCurve, t0, t1, vertices
-
Methods inherited from interface math.geom2d.ShapeSet2D
add, add, clear, indexOf, remove, remove, size
-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, isBounded, isEmpty
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Method Detail
-
contains
boolean contains(T curve)
Checks if the curve set contains the given curve.- Specified by:
containsin interfaceShapeSet2D<T extends Curve2D>
-
curves
java.util.Collection<T> curves()
Returns the collection of curves- Returns:
- the inner collection of curves
-
get
T get(int index)
Returns the inner curve corresponding to the given index.- Specified by:
getin interfaceShapeSet2D<T extends Curve2D>- Parameters:
index- index of the curve- Returns:
- the i-th inner curve
- Since:
- 0.6.3
-
childCurve
T childCurve(double t)
Returns the child curve corresponding to a given position.- Parameters:
t- the position on the set of curves, between 0 and twice the number of curves- Returns:
- the curve corresponding to the position.
- Since:
- 0.6.3
-
firstCurve
T firstCurve()
Returns the first curve of the collection if it exists, null otherwise.- Returns:
- the first curve of the collection
-
lastCurve
T lastCurve()
Returns the last curve of the collection if it exists, null otherwise.- Returns:
- the last curve of the collection
-
localPosition
double localPosition(double t)
Converts the position on the curve set, which is comprised between 0 and 2*Nc-1 with Nc being the number of curves, to the position on the curve which contains the position. The result is comprised between the t0 and the t1 of the child curve.- Parameters:
t- the position on the curve set- Returns:
- the position on the subcurve
- See Also:
globalPosition(int, double),curveIndex(double)
-
globalPosition
double globalPosition(int i, double t)Converts a position on a curve (between t0 and t1 of the curve) to the position on the curve set (between 0 and 2*Nc-1).- Parameters:
i- the index of the curve to considert- the position on the curve- Returns:
- the position on the curve set, between 0 and 2*Nc-1
- See Also:
localPosition(double),curveIndex(double)
-
curveIndex
int curveIndex(double t)
Returns the index of the curve corresponding to a given position.- Parameters:
t- the position on the set of curves, between 0 and twice the number of curves minus 1- Returns:
- the index of the curve which contains position t
-
transform
CurveSet2D<? extends Curve2D> transform(AffineTransform2D trans)
Transforms each curve in the set and returns a new instance of CurveSet2D.
-
-
DMelt 3.0 © DataMelt by jWork.ORG