Uses of Class
com.google.common.geometry.R2Rect

  • Uses of R2Rect in com.google.common.geometry

    Fields in com.google.common.geometry declared as R2Rect
    Modifier and Type
    Field
    Description
    private R2Rect
    S2PaddedCell.bound
    Bound in (u,v)-space.
    private final R2Rect
    S2ShapeIndex.ClippedEdge.bound
    Bounding box for the clipped portion.
    private final R2Rect
    S2ShapeIndexRegion.bound
    Temporary bound for internal usage.
    private R2Rect
    S2PaddedCell.middle
    The rectangle in (u,v)-space that belongs to all four padded children.
    Methods in com.google.common.geometry that return R2Rect
    Modifier and Type
    Method
    Description
    S2PaddedCell.bound()
    Returns the bound for this cell (including padding.)
    static R2Rect
    R2Rect.empty()
    Returns a new instance of the canonical empty rectangle.
    R2Rect.expanded(double margin)
    Returns a rectangle that has been expanded on both sides by the given margin.
    R2Rect.expanded(R2Vector margin)
    Return a rectangle that has been expanded on each side in the x-direction by margin.x(), and on each side in the y-direction by margin.y().
    static R2Rect
    R2Rect.fromCenterSize(R2Vector center, R2Vector size)
    Returns a new rectangle from a center point and size in each dimension.
    static R2Rect
    R2Rect.fromPoint(R2Vector p)
    Returns a rectangle containing a single point.
    static R2Rect
    Returns the minimal bounding rectangle containing the two given points.
    S2CellId.getBoundST()
    Returns the bounds of this cell in (s,t)-space.
    S2Cell.getBoundUV()
    Returns the bounds of this cell in (u,v)-space.
    S2CellId.getBoundUV()
    Returns the bounds of this cell in (u,v)-space.
    (package private) static R2Rect
    S2EdgeUtil.getClippedEdgeBound(R2Vector a, R2Vector b, R2Rect clip)
    Given an edge AB and a rectangle "clip", return the bounding rectangle of the portion of AB intersected by "clip".
    (package private) static R2Rect
    S2CellId.ijLevelToBoundUv(int i, int j, int level)
    Returns the bound in (u,v)-space for the cell at the given level containing the leaf cell with the given (i,j)-coordinates.
    R2Rect.intersection(R2Rect other)
    Returns the smallest rectangle containing the intersection of this rectangle and the given rectangle.
    S2PaddedCell.middle()
    Return the "middle" of the padded cell, defined as the rectangle that belongs to all four children.
    R2Rect.union(R2Rect other)
    Returns the smallest rectangle containing the union of this rectangle and the given rectangle.
    Methods in com.google.common.geometry with parameters of type R2Rect
    Modifier and Type
    Method
    Description
    void
    R2Rect.addRect(R2Rect other)
    Expand the rectangle to include the given other rectangle.
    boolean
    R2Rect.approxEquals(R2Rect other)
    Returns true if the x- and y-intervals of the two rectangles are the same up to the given tolerance.
    boolean
    R2Rect.approxEquals(R2Rect other, double maxError)
    Returns true if the given rectangles are equal to within maxError.
    (package private) static boolean
    S2EdgeUtil.clipEdge(R2Vector a, R2Vector b, R2Rect clip, R2Vector aClipped, R2Vector bClipped)
    Given an edge AB, assigns the portion of AB that is contained by the given rectangle "clip" to the aClipped and bClipped arguments, and returns true if there is an intersection.
    (package private) static boolean
    S2EdgeUtil.clipEdgeBound(R2Vector a, R2Vector b, R2Rect clip, R2Rect bound)
    This function can be used to clip an edge AB to sequence of rectangles efficiently.
    private void
    S2EdgeQuery.clipVAxis(R2Rect edgeBound, double center, int i, S2PaddedCell pCell, R2Vector aVector, R2Vector bVector)
    Given either the left (i = 0) or right (i = 1) side of a padded cell pCell, determines whether the current edge intersects the lower child, upper child, or both children, and calls getCells() recursively on those children.
    boolean
    R2Rect.contains(R2Rect other)
    Returns true if and only if this rectangle contains the given other rectangle.
    private void
    S2EdgeQuery.getCells(S2PaddedCell pCell, R2Rect edgeBound, R2Vector aVector, R2Vector bVector)
    Computes the index cells intersected by the current edge that are descendants of pCell, and adds them to cells.
    (package private) static R2Rect
    S2EdgeUtil.getClippedEdgeBound(R2Vector a, R2Vector b, R2Rect clip)
    Given an edge AB and a rectangle "clip", return the bounding rectangle of the portion of AB intersected by "clip".
    abstract R1Interval
    R2Rect.Axis.getInterval(R2Rect rect)
     
    boolean
    R2Rect.interiorContains(R2Rect other)
    Returns true if and only if the interior of this rectangle contains all points of the given other rectangle (including its boundary).
    boolean
    R2Rect.interiorIntersects(R2Rect other)
    Return true if and only if the interior of this rectangle intersects any point (including the boundary) of the given other rectangle.
    R2Rect.intersection(R2Rect other)
    Returns the smallest rectangle containing the intersection of this rectangle and the given rectangle.
    boolean
    R2Rect.intersects(R2Rect other)
    Returns true if this rectangle and the given other rectangle have any points in common.
    (package private) static boolean
    S2EdgeUtil.intersectsRect(R2Vector a, R2Vector b, R2Rect rect)
    Returns true if the edge AB intersects the given (closed) rectangle to within the error bound below.
    (package private) void
    S2Cell.setBoundUV(R2Rect bound)
    Sets the bounds of this cell in (u,v)-space into 'bound'.
    S2PaddedCell.shrinkToFit(R2Rect rect)
    Returns the smallest cell that contains all descendants of this cell whose bounds intersect "rect".
    private void
    S2EdgeQuery.splitBound(R2Rect edgeBound, int uEnd, double u, int vEnd, double v, R2Rect[] childBounds)
    Splits the current edge into two child edges at the given point (u, v) and returns the bound for each child.
    private void
    S2EdgeQuery.splitUBound(R2Rect edgeBound, double u, R2Rect[] childBounds, R2Vector aVector, R2Vector bVector)
    Splits the current edge into two child edges at u and returns the bound for each child.
    private void
    S2EdgeQuery.splitVBound(R2Rect edgeBound, double v, R2Rect[] childBounds, R2Vector aVector, R2Vector bVector)
    Splits the current edge into two child edges at v and returns the bound for each child.
    R2Rect.union(R2Rect other)
    Returns the smallest rectangle containing the union of this rectangle and the given rectangle.
    Constructors in com.google.common.geometry with parameters of type R2Rect
    Modifier
    Constructor
    Description
     
    R2Rect(R2Rect rect)
    Copy constructor.