Class Rectangle2D


  • public class Rectangle2D
    extends Object
    2D rectangle implementation containing spatial logic.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Method Detail

      • create

        public static Rectangle2D create​(Rectangle rectangle)
        Builds a Rectangle2D from rectangle
      • crossesDateline

        public boolean crossesDateline()
      • queryContainsPoint

        public boolean queryContainsPoint​(int x,
                                          int y)
        Checks if the rectangle contains the provided point
      • relateRangeBBox

        public PointValues.Relation relateRangeBBox​(int minXOffset,
                                                    int minYOffset,
                                                    byte[] minTriangle,
                                                    int maxXOffset,
                                                    int maxYOffset,
                                                    byte[] maxTriangle)
        compare this to a provided rangle bounding box
      • intersectsTriangle

        public boolean intersectsTriangle​(int aX,
                                          int aY,
                                          int bX,
                                          int bY,
                                          int cX,
                                          int cY)
        Checks if the rectangle intersects the provided triangle
      • containsTriangle

        public boolean containsTriangle​(int ax,
                                        int ay,
                                        int bx,
                                        int by,
                                        int cx,
                                        int cy)
        Checks if the rectangle contains the provided triangle
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object