java.lang.Object
org.jhotdraw8.geom.contour.ContourIntersections
ContourIntersections.
References:
This code has been derived from CavalierContours.
- CavalierContours. Copyright (c) 2019 Jedidiah Buck McCready. MIT License.
- github.com
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidallSelfIntersects(PlinePath pline, List<PlineIntersect> output, StaticSpatialIndex spatialIndex) static IntersectionResultintrCircle2Circle2(double radius1, Point2D.Double center1, double radius2, Point2D.Double center2) Find intersect between two circles in 2D.static IntersectionResultintrLineSeg2Circle2(Point2D.Double p0, Point2D.Double p1, double radius, Point2D.Double circleCenter) Gets the intersect between a segment and a circle, returning the parametric solution t to the segment equation P(t) = v1 + t * (v2 - v1) for t = 0 to t = 1, if t < 0 or t > 1 then intersect occurs only when extending the segment out past the points given (if t < 0 intersect nearest v1, if t > 0 then intersect nearest v2), intersects are "sticky" and "snap" to tangent points, e.g.static IntersectionResultExintrLineSeg2LineSeg2(Point2D.Double u1, Point2D.Double u2, Point2D.Double v1, Point2D.Double v2) static voidlocalSelfIntersects(PlinePath pline, List<PlineIntersect> output) Finds all local self intersects of the polyline, local self intersects are defined as between two polyline segments that share a vertex.
-
Field Details
-
REAL_THRESHOLD
public static final double REAL_THRESHOLD- See Also:
-
-
Method Details
-
intrCircle2Circle2
public static IntersectionResult intrCircle2Circle2(double radius1, Point2D.Double center1, double radius2, Point2D.Double center2) Find intersect between two circles in 2D. -
intrLineSeg2LineSeg2
public static IntersectionResultEx intrLineSeg2LineSeg2(Point2D.Double u1, Point2D.Double u2, Point2D.Double v1, Point2D.Double v2) -
intrLineSeg2Circle2
public static IntersectionResult intrLineSeg2Circle2(Point2D.Double p0, Point2D.Double p1, double radius, Point2D.Double circleCenter) Gets the intersect between a segment and a circle, returning the parametric solution t to the segment equation P(t) = v1 + t * (v2 - v1) for t = 0 to t = 1, if t < 0 or t > 1 then intersect occurs only when extending the segment out past the points given (if t < 0 intersect nearest v1, if t > 0 then intersect nearest v2), intersects are "sticky" and "snap" to tangent points, e.g. a segment very close to being a tangent will be returned as a single intersect point. -
localSelfIntersects
Finds all local self intersects of the polyline, local self intersects are defined as between two polyline segments that share a vertex. NOTES: - Singularities (repeating vertexes) are returned as coincident intersects -
allSelfIntersects
public static void allSelfIntersects(PlinePath pline, List<PlineIntersect> output, StaticSpatialIndex spatialIndex)
-