Uses of Class
com.google.common.geometry.S2Loop
-
-
Uses of S2Loop in com.google.common.geometry
Fields in com.google.common.geometry declared as S2Loop Modifier and Type Field Description private S2LoopS2Loop.LoopCrosser. aprivate S2LoopS2Loop.LoopCrosser. bFields in com.google.common.geometry with type parameters of type S2Loop Modifier and Type Field Description private java.util.List<S2Loop>S2Polygon. loopsThe loops of this polygon.Methods in com.google.common.geometry that return S2Loop Modifier and Type Method Description private S2LoopS2PolygonBuilder. assembleLoop(S2Point v0, S2Point v1, java.util.List<S2Edge> unusedEdges)We start at the given edge and assemble a loop taking left turns whenever possible.(package private) static S2LoopS2Loop. decode(LittleEndianInput decoder)Returns a loop decoded from the given stream.(package private) static S2LoopS2Loop. decodeCompressed(int level, LittleEndianInput decoder)private static S2LoopS2Loop. decodeInternal(LittleEndianInput decoder)static S2LoopS2Loop. empty()Returns a new loop with one vertex that defines an empty loop (i.e., a loop with no edges that contains no points.)static S2LoopS2Loop. full()Returns a new loop with one vertex that creates a full loop (i.e., a loop with no edges that contains all points).S2LoopS2ConvexHullQuery. getConvexHull()Computes the convex hull of the input geometry provided.private static S2LoopS2ConvexHullQuery. getSingleEdgeLoop(S2Point a, S2Point b)Construct a loop consisting of the two vertices and their midpoint.private static S2LoopS2ConvexHullQuery. getSinglePointLoop(S2Point p)Constructs a 3-vertex polygon consisting of "p" and two nearby vertices.S2LoopS2Polygon. loop(int k)Returns the loop at the given index.S2LoopS2FractalBuilder. makeLoop(Matrix3x3 frame, S1Angle nominalRadius)Returns a fractal loop centered around the a-axis of the given coordinate frame, with the first vertex in the direction of the positive x-axis, and the given nominal radius.static S2LoopS2TextFormat. makeLoop(java.lang.String str)As above, but does not CHECK-fail on invalid input.static S2LoopS2TextFormat. makeLoopOrDie(java.lang.String str)Given a string of latitude-longitude coordinates in degrees, returns a newly allocated loop.static S2LoopS2Loop. makeRegularLoop(S2Point center, S1Angle radius, int numVertices)Create a circle of points with a given center, radius, and number of vertices.static S2LoopS2Loop. newLoopWithTrustedDetails(java.util.List<S2Point> vertices, boolean originInside, S2LatLngRect bound)Fast/unsafe loop initialization.S2LoopS2Loop. simplify(S1Angle tolerance, com.google.common.base.Predicate<S2Point> vertexFilter)Returns a simplified loop, which may be self-intersecting, or null if the entire loop was within the tolerance.private S2LoopS2PolygonBuilder. snapLoopToLevel(S2Loop loop, int level)Returns a new loop where the vertices of the given loop have been snapped to the centers of cells at the specified level.S2LoopS2CellId. toLoop(int level)Returns a loop along the boundary of this cell, with vertices at intersections with the cell grid atlevel.Methods in com.google.common.geometry that return types with arguments of type S2Loop Modifier and Type Method Description java.util.List<S2Loop>S2Polygon. getLoops()Returns a view of the list ofS2Loops that make up this S2Polygon.Methods in com.google.common.geometry with parameters of type S2Loop Modifier and Type Method Description voidS2ConvexHullQuery. addLoop(S2Loop loop)Adds a loop to the input geometry.voidS2PolygonBuilder. addLoop(S2Loop loop)Adds all edges in the given loop.private booleanS2Polygon. anyLoopContains(S2Loop b)Returns true if any loop contains the given loop.private booleanS2Polygon. anyLoopIntersects(S2Loop b)Returns true if any loop intersects the given loop.(package private) booleanS2Loop. boundaryApproxEquals(S2Loop loop)(package private) booleanS2Loop. boundaryApproxEquals(S2Loop b, double maxError)Returns true if two loops have the same boundary except for vertex perturbations.(package private) booleanS2Loop. boundaryEquals(S2Loop b)Returns true if two loops have the same boundary.(package private) booleanS2Loop. boundaryNear(S2Loop loop)(package private) booleanS2Loop. boundaryNear(S2Loop b, double maxError)Returns true if the two loop boundaries are withinmaxErrorof each other along their entire lengths.intS2Loop. compareBoundary(S2Loop b)Returns +1 if A contains the boundary of B, -1 if A excludes the boundary of B, and 0 if the boundaries of A and B cross.(package private) intS2Polygon. compareBoundary(S2Loop b)Returns +1 if this polygon (A) contains the boundary of B, -1 if A excludes the boundary of B, and 0 if the boundaries of A and B cross.intS2Loop. compareTo(S2Loop other)Comparator (needed by Comparable interface)booleanS2Loop. contains(S2Loop b)Return true if the region contained by this loop is a superset of the region contained by the given other loop.booleanS2Loop. containsNested(S2Loop b)Given two loops of a polygon, return true if A contains B.private booleanS2Polygon. containsNonCrossingBoundary(S2Loop b, boolean bReverse)Given a polygon A and a loop B whose boundaries do not cross, returns true if A contains the boundary of B.private booleanS2Polygon. containsNonCrossingBoundary(S2Loop a, S2Loop b, boolean bReverse)Given two loops whose boundaries do not cross (seeS2Polygon.compareBoundary(S2Loop), returns true if A contains the boundary of B.private voidS2PolygonBuilder. eraseLoop(S2Loop v, int n)(package private) static booleanS2ShapeUtil. findSelfIntersection(S2ShapeIndex.S2ClippedShape aClipped, S2Loop aLoop, S2Error error)Test for crossings between all edge pairs that do not share a vertex.(package private) static booleanS2ShapeUtil. findSelfIntersection(S2ShapeIndex index, S2Loop loop, S2Error error)Given an S2ShapeIndex containing a single loop, return true if the loop has a self-intersection (including duplicate vertices) and set "error" to a human-readable error message.(package private) static booleanS2ShapeUtil. getCrossingError(java.util.List<S2Loop> loops, S2Loop aLoop, int ai, S2Loop bLoop, int bj, int crossing, S2Error error)Given two loop edges for which RobustCrossing returned a non-negative result "crossing", returns true if there is a crossing and sets "error" to a human-readable error message, otherwise returns false.private static booleanS2Loop. hasCrossingRelation(S2Loop a, S2Loop b, S2Loop.LoopRelation relation)This method checks all edges of loop A for intersection against all edges of loop B.private voidS2Polygon. initLoop(S2Loop loop, int depth, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)private static voidS2Polygon. insertLoop(S2Loop newLoop, S2Loop parent, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)booleanS2Loop. intersects(S2Loop b)Return true if the region contained by this loop intersects the region contained by the given other loop.(package private) booleanS2Loop. matchBoundaries(S2Loop b, int aOffset, double maxError)Helper method called byboundaryNear()to determine if this loop and loopbremain withinmaxErrorof each other, starting the comparison with this loop at vertexa_offsetand loopbat vertex 0.private voidS2PolygonBuilder. rejectLoop(S2Loop v, int n, java.util.List<S2Edge> unusedEdges)Erases all edges of the given loop and marks them as unused.private S2LoopS2PolygonBuilder. snapLoopToLevel(S2Loop loop, int level)Returns a new loop where the vertices of the given loop have been snapped to the centers of cells at the specified level.static java.lang.StringS2TextFormat. toString(S2Loop loop)Convert an S2Loop to the S2TextFormat string representation documented above.Method parameters in com.google.common.geometry with type arguments of type S2Loop Modifier and Type Method Description booleanS2PolygonBuilder. assembleLoops(java.util.List<S2Loop> loops, java.util.List<S2Edge> unusedEdges)Assembles the given edges into as many non-crossing loops as possible.(package private) static booleanS2ShapeUtil. findAnyCrossing(S2ShapeIndex index, java.util.List<S2Loop> loops, S2Error error)Given an S2ShapeIndex containing a set of loops, return true if any loop has a self-intersection (including duplicate vertices) or crosses any other loop (including vertex crossings and duplicate edges) and set "error" to a human-readable error message.(package private) static booleanS2ShapeUtil. findLoopCrossing(java.util.List<S2Loop> loops, S2ShapeIndex.Cell cell, S2Error error)Returns true if any of the given loops crosses a different loop (including vertex crossings) or two loops share a common edge, and sets "error" to a human-readable error message.(package private) static booleanS2ShapeUtil. findSelfIntersection(java.util.List<S2Loop> loops, S2ShapeIndex.Cell cell, S2Error error)Returns true if any of the given loops has a self-intersection (including a duplicate vertex), and set "error" to a human-readable error message.(package private) static booleanS2ShapeUtil. getCrossingError(java.util.List<S2Loop> loops, S2Loop aLoop, int ai, S2Loop bLoop, int bj, int crossing, S2Error error)Given two loop edges for which RobustCrossing returned a non-negative result "crossing", returns true if there is a crossing and sets "error" to a human-readable error message, otherwise returns false.voidS2Polygon. init(java.util.List<S2Loop> loops)Initializes a polygon by callingS2Polygon.initNested(List).private voidS2Polygon. initLoop(S2Loop loop, int depth, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)private voidS2Polygon. initLoop(S2Loop loop, int depth, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)voidS2Polygon. initNested(java.util.List<S2Loop> loops)Initializes this polygon from a set of hierarchically nested loops.voidS2Polygon. initOriented(java.util.List<S2Loop> loops)LikeS2Polygon.initNested(List), but expects loops to be oriented such that the polygon interior is on the left-hand side of all loops.voidS2Polygon. initWithNestedLoops(java.util.Map<S2Loop,java.util.List<S2Loop>> nestedLoops)Initializes a polygon from a set ofS2Loops.voidS2Polygon. initWithNestedLoops(java.util.Map<S2Loop,java.util.List<S2Loop>> nestedLoops)Initializes a polygon from a set ofS2Loops.private static voidS2Polygon. insertLoop(S2Loop newLoop, S2Loop parent, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)private static voidS2Polygon. insertLoop(S2Loop newLoop, S2Loop parent, java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)static booleanS2Polygon. isValid(java.util.List<S2Loop> loops)Returns true if the given loops form a valid polygon, including checking whether the loops themselves are valid.voidS2Polygon. release(java.util.List<S2Loop> loops)Appends the loops of this polygon to the given list and resets this polygon to be empty.private static voidS2Polygon. sortValueLoops(java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)For each map entry, sorts the value list.private static voidS2Polygon. sortValueLoops(java.util.Map<S2Loop,java.util.List<S2Loop>> loopMap)For each map entry, sorts the value list.Constructors in com.google.common.geometry with parameters of type S2Loop Constructor Description CompressedEncodingProperties(S2Loop loop)LoopCrosser(S2Loop a, S2Loop b, S2Loop.LoopRelation relation, boolean swapped)Ifswappedis true, the loops A and B have been swapped.S2Loop(S2Loop src)Copy constructor.S2Polygon(S2Loop loop)Copy constructor.Constructor parameters in com.google.common.geometry with type arguments of type S2Loop Constructor Description S2Polygon(java.util.List<S2Loop> loops)Creates an empty polygon and then callsS2Polygon.initNested(List)with the given loops.
-