Class IntersectCircleRectangle

java.lang.Object
org.jhotdraw8.geom.intersect.IntersectCircleRectangle

public class IntersectCircleRectangle extends Object
  • Method Details

    • intersectLineRectangleEx

      public static IntersectionResultEx intersectLineRectangleEx(Point2D a0, Point2D a1, Point2D r0, 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 line
      a1 - point 1 of the line
      r0 - corner point 0 of the rectangle
      r1 - corner point 1 of the rectangle
      Returns:
      computed intersection
    • intersectLineRectangleEx

      public static IntersectionResultEx intersectLineRectangleEx(Point2D a0, Point2D a1, Rectangle2D.Double r)
    • intersectRectangleLineEx

      public static IntersectionResultEx intersectRectangleLineEx(Rectangle2D.Double r, Point2D a0, Point2D a1)
    • intersectCircleRectangleEx

      public static IntersectionResultEx intersectCircleRectangleEx(double c1x, double c1y, double r1, double x, double y, double w, double h)
    • intersectCircleRectangleEx

      public static IntersectionResultEx intersectCircleRectangleEx(Point2D c, double r, Point2D r0, Point2D r1)
      Computes the intersection between a circle and a rectangle.
      Parameters:
      c - the center of the circle
      r - the radius of the circle
      r0 - corner point 0 of the rectangle
      r1 - corner point 1 of the rectangle
      Returns:
      computed intersection