Class Shape2d

    • Method Detail

      • overlaps

        public static boolean overlaps​(Bounds2d extent,
                                       Bounds2d shape)
        overlaps extent and shape. Overlap = Intersect + Contain
        Parameters:
        extent - Bounds2d; the extent
        shape - Bounds2d; the shape
        Returns:
        whether extent overlaps shape
      • intersects

        public static boolean intersects​(Bounds2d r1,
                                         Bounds2d r2)
        do the rectangles really intersect (so, not being contained)?
        Parameters:
        r1 - Bounds2d; the first rectangle
        r2 - Bounds2d; the second rectangle
        Returns:
        whether r1 really intersects r2
      • contains

        public static boolean contains​(Bounds2d r1,
                                       Bounds2d r2)
        is r1 completely in r2.
        Parameters:
        r1 - Bounds2d; the first rectangle
        r2 - Bounds2d; the second rectangle
        Returns:
        whether r1 in r2