math.geom2d.circulinear
Class PolyCirculinearCurve2D<T extends CirculinearContinuousCurve2D>
- java.lang.Object
-
- math.geom2d.curve.CurveArray2D<T>
-
- math.geom2d.curve.PolyCurve2D<T>
-
- math.geom2d.domain.PolyOrientedCurve2D<T>
-
- math.geom2d.circulinear.PolyCirculinearCurve2D<T>
-
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable<T>, CirculinearContinuousCurve2D, CirculinearCurve2D, CirculinearShape2D, ContinuousCurve2D, Curve2D, CurveSet2D<T>, ContinuousOrientedCurve2D, OrientedCurve2D, GeometricObject2D, Shape2D, ShapeSet2D<T>
- Direct Known Subclasses:
- BoundaryPolyCirculinearCurve2D, GenericCirculinearRing2D
public class PolyCirculinearCurve2D<T extends CirculinearContinuousCurve2D> extends PolyOrientedCurve2D<T> implements CirculinearContinuousCurve2D
A continuous curve which is composed of several continuous circulinear curves.
-
-
Constructor Summary
Constructors Constructor and Description PolyCirculinearCurve2D()PolyCirculinearCurve2D(java.util.Collection<? extends T> curves)PolyCirculinearCurve2D(java.util.Collection<? extends T> curves, boolean closed)PolyCirculinearCurve2D(int size)PolyCirculinearCurve2D(T[] curves)PolyCirculinearCurve2D(T[] curves, boolean closed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description CirculinearDomain2Dbuffer(double dist)Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d.CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D>clip(Box2D box)Clips the PolyCurve2D by a box.java.util.Collection<? extends PolyCirculinearCurve2D<?>>continuousCurves()Returns a collection of PolyCurve2D that contains only this instance.static <T extends CirculinearContinuousCurve2D>
PolyCirculinearCurve2D<T>create(T... curves)Static factory for creating a new PolyCirculinearCurve2D from an array of curves.static <T extends CirculinearContinuousCurve2D>
PolyCirculinearCurve2D<T>create(T[] curves, boolean closed)Static factory for creating a new PolyCirculinearCurve2D from an array of curves and a flag indicating if the curve is closed.static <T extends CirculinearContinuousCurve2D>
PolyCirculinearCurve2D<T>createClosed(T... curves)Static factory for creating a new PolyCirculinearCurve2D from an array of curves and a flag indicating if the curve is closed.doublelength()doublelength(double pos)CirculinearContinuousCurve2Dparallel(double d)Creates a new curve, formed by the points with parameterization:p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of the original curve, n(t) the normal of the curve, and |n| being the norm of n.
In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc.doubleposition(double length)PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D>reverse()Returns the reverse curve of this PolyCurve2D.java.util.Collection<? extends CirculinearElement2D>smoothPieces()Returns a collection containing only instances of SmoothCurve2D.PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D>subCurve(double t0, double t1)Returns a portion of this curve as an instance of PolyOrientedCurve2D.PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D>transform(CircleInversion2D inv)Transforms the shape by a circle inversion.-
Methods inherited from class math.geom2d.domain.PolyOrientedCurve2D
equals, isInside, signedDistance, signedDistance, transform, windingAngle
-
Methods inherited from class math.geom2d.curve.PolyCurve2D
appendPath, asPolyline, create, curvature, draw, getGeneralPath, isClosed, leftTangent, rightTangent, setClosed
-
Methods inherited from class math.geom2d.curve.CurveArray2D
add, add, almostEquals, asAwtShape, boundingBox, childCurve, clear, clone, contains, contains, contains, create, 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.domain.ContinuousOrientedCurve2D
transform
-
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
appendPath, asPolyline, curvature, isClosed, leftTangent, rightTangent
-
Methods inherited from interface math.geom2d.domain.OrientedCurve2D
isInside, signedDistance, signedDistance, windingAngle
-
Methods inherited from interface math.geom2d.curve.Curve2D
asAwtShape, clone, draw, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, singularPoints, t0, t1, vertices
-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, isBounded, isEmpty
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Constructor Detail
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D()
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D(int size)
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D(T[] curves)
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D(T[] curves, boolean closed)
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D(java.util.Collection<? extends T> curves)
-
PolyCirculinearCurve2D
public PolyCirculinearCurve2D(java.util.Collection<? extends T> curves, boolean closed)
-
-
Method Detail
-
create
public static <T extends CirculinearContinuousCurve2D> PolyCirculinearCurve2D<T> create(T... curves)
Static factory for creating a new PolyCirculinearCurve2D from an array of curves.- Since:
- 0.8.1
-
create
public static <T extends CirculinearContinuousCurve2D> PolyCirculinearCurve2D<T> create(T[] curves, boolean closed)
Static factory for creating a new PolyCirculinearCurve2D from an array of curves and a flag indicating if the curve is closed.- Since:
- 0.9.0
-
createClosed
public static <T extends CirculinearContinuousCurve2D> PolyCirculinearCurve2D<T> createClosed(T... curves)
Static factory for creating a new PolyCirculinearCurve2D from an array of curves and a flag indicating if the curve is closed.- Since:
- 0.9.0
-
length
public double length()
- Specified by:
lengthin interfaceCirculinearCurve2D- Returns:
- the length of the curve
-
length
public double length(double pos)
- Specified by:
lengthin interfaceCirculinearCurve2D- Returns:
- the length from the beginning to the position given by pos
-
position
public double position(double length)
- Specified by:
positionin interfaceCirculinearCurve2D- Returns:
- the position located at a given geodesic distance from the origin
-
buffer
public CirculinearDomain2D buffer(double dist)
Description copied from interface:CirculinearShape2DComputes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d.- Specified by:
bufferin interfaceCirculinearShape2D- Parameters:
dist- the maximal distance between a point of the buffer and the shape- Returns:
- the buffer of the shape
-
parallel
public CirculinearContinuousCurve2D parallel(double d)
Description copied from interface:CirculinearCurve2DCreates a new curve, formed by the points with parameterization:p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of the original curve, n(t) the normal of the curve, and |n| being the norm of n.
In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc.- Specified by:
parallelin interfaceCirculinearContinuousCurve2D- Specified by:
parallelin interfaceCirculinearCurve2D- Parameters:
d- the distance between the original curve and he parallel curve.- Returns:
- the parallel curve
-
transform
public PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D> transform(CircleInversion2D inv)
Description copied from interface:CirculinearShape2DTransforms the shape by a circle inversion. The result is still an instance a CirculinearShape2D.- Specified by:
transformin interfaceCirculinearContinuousCurve2D- Specified by:
transformin interfaceCirculinearCurve2D- Specified by:
transformin interfaceCirculinearShape2D- Parameters:
inv- the circle inversion- Returns:
- the transformed shape
-
smoothPieces
public java.util.Collection<? extends CirculinearElement2D> smoothPieces()
Description copied from class:PolyCurve2DReturns a collection containing only instances of SmoothCurve2D.- Specified by:
smoothPiecesin interfaceCirculinearContinuousCurve2D- Specified by:
smoothPiecesin interfaceContinuousCurve2D- Overrides:
smoothPiecesin classPolyCurve2D<T extends CirculinearContinuousCurve2D>- Returns:
- a collection of SmoothCurve2D
-
continuousCurves
public java.util.Collection<? extends PolyCirculinearCurve2D<?>> continuousCurves()
Description copied from class:PolyCurve2DReturns a collection of PolyCurve2D that contains only this instance.- Specified by:
continuousCurvesin interfaceCirculinearCurve2D- Specified by:
continuousCurvesin interfaceCurve2D- Overrides:
continuousCurvesin classPolyCurve2D<T extends CirculinearContinuousCurve2D>- Returns:
- a collection of continuous curves.
-
clip
public CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D> clip(Box2D box)
Description copied from class:PolyOrientedCurve2DClips the PolyCurve2D by a box. The result is an instance of CurveSet2D, which contains only instances of ContinuousOrientedCurve2D. If the PolyCurve2D is not clipped, the result is an instance of CurveSet2D which contains 0 curves.- Specified by:
clipin interfaceCirculinearContinuousCurve2D- Specified by:
clipin interfaceCirculinearCurve2D- Specified by:
clipin interfaceContinuousCurve2D- Specified by:
clipin interfaceCurve2D- Specified by:
clipin interfaceContinuousOrientedCurve2D- Specified by:
clipin interfaceOrientedCurve2D- Specified by:
clipin interfaceShape2D- Overrides:
clipin classPolyOrientedCurve2D<T extends CirculinearContinuousCurve2D>- Parameters:
box- the clipping box- Returns:
- the clipped shape
-
reverse
public PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D> reverse()
Description copied from class:PolyCurve2DReturns the reverse curve of this PolyCurve2D.- Specified by:
reversein interfaceCirculinearContinuousCurve2D- Specified by:
reversein interfaceCirculinearCurve2D- Specified by:
reversein interfaceContinuousCurve2D- Specified by:
reversein interfaceCurve2D- Specified by:
reversein interfaceContinuousOrientedCurve2D- Specified by:
reversein interfaceOrientedCurve2D- Overrides:
reversein classPolyOrientedCurve2D<T extends CirculinearContinuousCurve2D>
-
subCurve
public PolyCirculinearCurve2D<? extends CirculinearContinuousCurve2D> subCurve(double t0, double t1)
Description copied from class:PolyOrientedCurve2DReturns a portion of this curve as an instance of PolyOrientedCurve2D.- Specified by:
subCurvein interfaceCirculinearContinuousCurve2D- Specified by:
subCurvein interfaceCirculinearCurve2D- Specified by:
subCurvein interfaceContinuousCurve2D- Specified by:
subCurvein interfaceCurve2D- Specified by:
subCurvein interfaceContinuousOrientedCurve2D- Overrides:
subCurvein classPolyOrientedCurve2D<T extends CirculinearContinuousCurve2D>- Parameters:
t0- position of the start of the sub-curvet1- position of the end of the sub-curve- Returns:
- the portion of original curve comprised between t0 and t1.
-
-
DMelt 3.0 © DataMelt by jWork.ORG