java.lang.Object
org.jhotdraw8.geom.intersect.IntersectLineLine
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntersectionResultintersectLineLine(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y) static @NonNull IntersectionResultExintersectLineLineEx(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y) Intersects line segment 'a' with line segment 'b'.static @NonNull IntersectionResultExintersectLineLineEx(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y, double epsilon) Intersects a line segment 'a' with line segment 'b'.static @NonNull IntersectionResultExintersectLineLineEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Point2D b0, @NonNull Point2D b1) Computes the intersection of line segment 'a' with line segment 'b'.static @NonNull IntersectionResultExintersectLineLineEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Point2D b0, @NonNull Point2D b1, double epsilon)
-
Method Details
-
intersectLineLineEx
public static @NonNull IntersectionResultEx intersectLineLineEx(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y) Intersects line segment 'a' with line segment 'b'.- Parameters:
a0x- start x coordinate of line 'a'a0y- start y coordinate of line 'a'a1x- end x coordinate of line 'a'a1y- end y coordinate of line 'a'b0x- start x coordinate of line 'b'b0y- start y coordinate of line 'b'b1x- end x coordinate of line 'b'b1y- end y coordinate of line 'b'- Returns:
- computed intersection with parameters of line 'a' at the intersection point
- See Also:
-
intersectLineLineEx
public static @NonNull IntersectionResultEx intersectLineLineEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Point2D b0, @NonNull Point2D b1) Computes the intersection of line segment 'a' with line segment 'b'.- Parameters:
a0- start of line segment 'a'a1- end of line segment 'a'b0- start of line segment 'b'b1- end of line segment 'b'- Returns:
- computed intersection with parameters of line 'a' at the intersection point
- See Also:
-
intersectLineLineEx
-
intersectLineLineEx
public static @NonNull IntersectionResultEx intersectLineLineEx(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y, double epsilon) Intersects a line segment 'a' with line segment 'b'.This method can produce the following
IntersectionStatuscodes:IntersectionStatus.INTERSECTION-
The line segments intersect at the
IntersectionPointExgiven in the result. IntersectionStatus.NO_INTERSECTION-
The line segments do not intersect, but lines of infinite length,
will intersect at the
IntersectionPointExgiven in the result. IntersectionStatus.NO_INTERSECTION_COINCIDENT-
The lines segments do not intersect because they are
coincident. Coincidence starts and ends at the two
IntersectionPointExs given in the result. IntersectionStatus.NO_INTERSECTION_PARALLEL- The lines segments do not intersect because they are parallel.
- Parameters:
a0x- start x coordinate of line segment 'a'a0y- start y coordinate of line segment 'a'a1x- end x coordinate of line segment 'a'a1y- end y coordinate of line segment 'a'b0x- start x coordinate of line segment 'b'b0y- start y coordinate of line segment 'b'b1x- end x coordinate of line segment 'b'b1y- end y coordinate of line segment 'b'- Returns:
- computed intersection with parameters t of 'a' at the intersection point
-
intersectLineLine
public static IntersectionResult intersectLineLine(double a0x, double a0y, double a1x, double a1y, double b0x, double b0y, double b1x, double b1y)
-