Uses of Class
com.google.common.geometry.S2Loop
-
Uses of S2Loop in com.google.common.geometry
Classes in com.google.common.geometry that implement interfaces with type arguments of type S2LoopModifier and TypeClassDescriptionfinal classAn S2Loop represents a simple spherical polygon.Methods in com.google.common.geometry that return S2LoopModifier and TypeMethodDescriptionstatic final 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 final 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).S2ConvexHullQuery.getConvexHull()Computes the convex hull of the input geometry provided.S2Polygon.loop(int k) Returns the loop at the given index.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 S2LoopAs above, but does not CHECK-fail on invalid input.static S2LoopS2TextFormat.makeLoopOrDie(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(List<S2Point> vertices, boolean originInside, S2LatLngRect bound) Fast/unsafe loop initialization.Returns a simplified loop, which may be self-intersecting, or null if the entire loop was within the tolerance.S2CellId.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 S2LoopModifier and TypeMethodDescriptionS2Polygon.getLoops()Returns a view of the list ofS2Loops that make up this S2Polygon.Methods in com.google.common.geometry with parameters of type S2LoopModifier and TypeMethodDescriptionvoidAdds a loop to the input geometry.voidAdds all edges in the given loop.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.intComparator (needed by Comparable interface)booleanReturn 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.booleanS2Loop.intersects(S2Loop b) Return true if the region contained by this loop intersects the region contained by the given other loop.static StringConvert an S2Loop to the S2TextFormat string representation documented above.Method parameters in com.google.common.geometry with type arguments of type S2LoopModifier and TypeMethodDescriptionbooleanS2PolygonBuilder.assembleLoops(List<S2Loop> loops, List<S2Edge> unusedEdges) Assembles the given edges into as many non-crossing loops as possible.voidInitializes a polygon by callingS2Polygon.initNested(List).voidS2Polygon.initNested(List<S2Loop> loops) Initializes this polygon from a set of hierarchically nested loops.voidS2Polygon.initOriented(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(Map<S2Loop, List<S2Loop>> nestedLoops) Initializes a polygon from a set ofS2Loops.voidS2Polygon.initWithNestedLoops(Map<S2Loop, List<S2Loop>> nestedLoops) Initializes a polygon from a set ofS2Loops.static booleanReturns true if the given loops form a valid polygon, including checking whether the loops themselves are valid.voidAppends the loops of this polygon to the given list and resets this polygon to be empty.Constructors in com.google.common.geometry with parameters of type S2LoopModifierConstructorDescriptionCopy constructor.Copy constructor.Constructor parameters in com.google.common.geometry with type arguments of type S2LoopModifierConstructorDescriptionCreates an empty polygon and then callsS2Polygon.initNested(List)with the given loops.