Package com.google.common.geometry
Class S2ShapeIndex.S2ClippedShape.ManyEdges
- java.lang.Object
-
- com.google.common.geometry.S2ShapeIndex.Cell
-
- com.google.common.geometry.S2ShapeIndex.S2ClippedShape
-
- com.google.common.geometry.S2ShapeIndex.S2ClippedShape.ManyEdges
-
- All Implemented Interfaces:
S2Iterator.Entry,java.io.Serializable
- Enclosing class:
- S2ShapeIndex.S2ClippedShape
private abstract static class S2ShapeIndex.S2ClippedShape.ManyEdges extends S2ShapeIndex.S2ClippedShape
An S2ClippedShape that contains the non-contiguous edges fromstarttoendinedges. A much larger object than the other subclasses of S2ClippedShape, but also the rarest.
-
-
Field Summary
Fields Modifier and Type Field Description private int[]edges
-
Constructor Summary
Constructors Modifier Constructor Description privateManyEdges(S2Shape shape, int[] edges)privateManyEdges(S2Shape shape, java.util.List<S2ShapeIndex.ClippedEdge> edges, int start, int end)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static S2ShapeIndex.S2ClippedShape.ManyEdgescreate(S2CellId cellId, S2Shape shape, boolean containsCenter, int[] edges)(package private) static S2ShapeIndex.S2ClippedShape.ManyEdgescreate(S2CellId cellId, S2Shape shape, boolean containsCenter, java.util.List<S2ShapeIndex.ClippedEdge> edges, int start, int end)intedge(int i)Returns theith edge ID of this clipped shape.intnumEdges()Returns the number of edges that intersect the S2CellId.-
Methods inherited from class com.google.common.geometry.S2ShapeIndex.S2ClippedShape
clipped, containsCenter, containsEdge, create, numShapes, shape
-
Methods inherited from class com.google.common.geometry.S2ShapeIndex.Cell
create, findClipped, id
-
-
-
-
Constructor Detail
-
ManyEdges
private ManyEdges(S2Shape shape, java.util.List<S2ShapeIndex.ClippedEdge> edges, int start, int end)
-
ManyEdges
private ManyEdges(S2Shape shape, int[] edges)
-
-
Method Detail
-
create
static S2ShapeIndex.S2ClippedShape.ManyEdges create(@Nullable S2CellId cellId, S2Shape shape, boolean containsCenter, java.util.List<S2ShapeIndex.ClippedEdge> edges, int start, int end)
-
create
static S2ShapeIndex.S2ClippedShape.ManyEdges create(@Nullable S2CellId cellId, S2Shape shape, boolean containsCenter, int[] edges)
-
numEdges
public final int numEdges()
Description copied from class:S2ShapeIndex.S2ClippedShapeReturns the number of edges that intersect the S2CellId.- Specified by:
numEdgesin classS2ShapeIndex.S2ClippedShape
-
edge
public final int edge(int i)
Description copied from class:S2ShapeIndex.S2ClippedShapeReturns theith edge ID of this clipped shape. Edges are sorted in increasing order of edge ID. The edge IDs may be passed to the corresponding shape'sS2Shape.getEdge(int, com.google.common.geometry.S2Shape.MutableEdge)method.- Specified by:
edgein classS2ShapeIndex.S2ClippedShape- Parameters:
i- must be at least 0 and less thanS2ShapeIndex.S2ClippedShape.numEdges()
-
-