java.lang.Object
org.jhotdraw8.geom.intersect.IntersectCircleRectangle
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull IntersectionResultExintersectCircleRectangleEx(double c1x, double c1y, double r1, double x, double y, double w, double h) static @NonNull IntersectionResultExComputes the intersection between a circle and a rectangle.static @NonNull IntersectionResultExintersectLineRectangleEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Point2D r0, @NonNull Point2D r1) Computes the intersection between a line and a rectangle.static @NonNull IntersectionResultExstatic @NonNull IntersectionResultEx
-
Method Details
-
intersectLineRectangleEx
public static @NonNull IntersectionResultEx intersectLineRectangleEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Point2D r0, @NonNull Point2D r1) Computes the intersection between a line and a rectangle.The intersection will contain the parameters 't1' of the line in range [0,1].
- Parameters:
a0- point 0 of the linea1- point 1 of the liner0- corner point 0 of the rectangler1- corner point 1 of the rectangle- Returns:
- computed intersection
-
intersectLineRectangleEx
public static @NonNull IntersectionResultEx intersectLineRectangleEx(@NonNull Point2D a0, @NonNull Point2D a1, @NonNull Rectangle2D.Double r) -
intersectRectangleLineEx
public static @NonNull IntersectionResultEx intersectRectangleLineEx(@NonNull Rectangle2D.Double r, @NonNull Point2D a0, @NonNull Point2D a1) -
intersectCircleRectangleEx
public static @NonNull IntersectionResultEx intersectCircleRectangleEx(double c1x, double c1y, double r1, double x, double y, double w, double h) -
intersectCircleRectangleEx
public static @NonNull IntersectionResultEx intersectCircleRectangleEx(@NonNull Point2D c, double r, @NonNull Point2D r0, @NonNull Point2D r1) Computes the intersection between a circle and a rectangle.- Parameters:
c- the center of the circler- the radius of the circler0- corner point 0 of the rectangler1- corner point 1 of the rectangle- Returns:
- computed intersection
-