math.geom2d.polygon
Class Polylines2D
- java.lang.Object
-
- math.geom2d.polygon.Polylines2D
-
public abstract class Polylines2D extends java.lang.ObjectSome utility functions for manipulating Polyline2D.- Since:
- 0.6.3
-
-
Constructor Summary
Constructors Constructor and Description Polylines2D()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleanhasMultipleVertices(LinearCurve2D polyline)Checks if the open polyline has multiple vertices.static booleanhasMultipleVertices(LinearCurve2D polyline, boolean closed)Checks if the input polyline has multiple vertices.static java.util.Collection<Point2D>intersect(LinearCurve2D poly1, LinearCurve2D poly2)Return all intersection points between the 2 polylines.
-
-
-
Method Detail
-
hasMultipleVertices
public static final boolean hasMultipleVertices(LinearCurve2D polyline)
Checks if the open polyline has multiple vertices. Polyline extremities are not tested for equality.
-
hasMultipleVertices
public static final boolean hasMultipleVertices(LinearCurve2D polyline, boolean closed)
Checks if the input polyline has multiple vertices. Extremities are tested if the polyline is closed (second argument is true).
-
intersect
public static java.util.Collection<Point2D> intersect(LinearCurve2D poly1, LinearCurve2D poly2)
Return all intersection points between the 2 polylines. This method implements a naive algorithm, that tests all possible edge couples. It is supposed that only one point is returned by intersection.- Parameters:
poly1- a first polylinepoly2- a second polyline- Returns:
- the set of intersection points
-
-
DMelt 3.0 © DataMelt by jWork.ORG