Package com.google.common.geometry
Class S2ShapeIndex.S2ClippedShape.OneEdge
- java.lang.Object
-
- com.google.common.geometry.S2ShapeIndex.Cell
-
- com.google.common.geometry.S2ShapeIndex.S2ClippedShape
-
- com.google.common.geometry.S2ShapeIndex.S2ClippedShape.OneEdge
-
- All Implemented Interfaces:
S2Iterator.Entry
,java.io.Serializable
- Enclosing class:
- S2ShapeIndex.S2ClippedShape
private abstract static class S2ShapeIndex.S2ClippedShape.OneEdge extends S2ShapeIndex.S2ClippedShape
An S2ClippedShape that contains a single edge from a given shape. Very common.
-
-
Field Summary
Fields Modifier and Type Field Description private int
edge
-
Constructor Summary
Constructors Modifier Constructor Description private
OneEdge(S2Shape shape, S2ShapeIndex.ClippedEdge clippedEdge)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static S2ShapeIndex.S2ClippedShape.OneEdge
create(S2CellId cellId, S2Shape shape, boolean containsCenter, S2ShapeIndex.ClippedEdge clippedEdge)
int
edge(int i)
Returns thei
th edge ID of this clipped shape.int
numEdges()
Returns the number of edges that intersect the S2CellId.-
Methods inherited from class com.google.common.geometry.S2ShapeIndex.S2ClippedShape
clipped, containsCenter, containsEdge, create, create, create, numShapes, shape
-
Methods inherited from class com.google.common.geometry.S2ShapeIndex.Cell
create, findClipped, id
-
-
-
-
Constructor Detail
-
OneEdge
private OneEdge(S2Shape shape, S2ShapeIndex.ClippedEdge clippedEdge)
-
-
Method Detail
-
create
static final S2ShapeIndex.S2ClippedShape.OneEdge create(@Nullable S2CellId cellId, S2Shape shape, boolean containsCenter, S2ShapeIndex.ClippedEdge clippedEdge)
-
numEdges
public final int numEdges()
Description copied from class:S2ShapeIndex.S2ClippedShape
Returns the number of edges that intersect the S2CellId.- Specified by:
numEdges
in classS2ShapeIndex.S2ClippedShape
-
edge
public final int edge(int i)
Description copied from class:S2ShapeIndex.S2ClippedShape
Returns thei
th 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:
edge
in classS2ShapeIndex.S2ClippedShape
- Parameters:
i
- must be at least 0 and less thanS2ShapeIndex.S2ClippedShape.numEdges()
-
-