Package com.google.common.geometry
Class S2ShapeIndex.S2ClippedShape.Contained
java.lang.Object
com.google.common.geometry.S2ShapeIndex.Cell
com.google.common.geometry.S2ShapeIndex.S2ClippedShape
com.google.common.geometry.S2ShapeIndex.S2ClippedShape.Contained
- All Implemented Interfaces:
S2Iterator.Entry,Serializable
- Enclosing class:
S2ShapeIndex.S2ClippedShape
private abstract static class S2ShapeIndex.S2ClippedShape.Contained
extends S2ShapeIndex.S2ClippedShape
An S2ClippedShape for a shape that completely contains the cell (no edge intersections and
containsCenter is true.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns whether the center of the S2CellId is inside the shape, and always returns false for shapes that do not have an interior according toS2Shape.hasInterior().(package private) static S2ShapeIndex.S2ClippedShape.Containedfinal intedge(int i) Returns theith edge ID of this clipped shape.final intnumEdges()Returns the number of edges that intersect the S2CellId.Methods inherited from class com.google.common.geometry.S2ShapeIndex.S2ClippedShape
clipped, containsEdge, create, create, create, numShapes, shapeMethods inherited from class com.google.common.geometry.S2ShapeIndex.Cell
create, findClipped, id
-
Constructor Details
-
Contained
-
-
Method Details
-
create
-
containsCenter
public final boolean containsCenter()Description copied from class:S2ShapeIndex.S2ClippedShapeReturns whether the center of the S2CellId is inside the shape, and always returns false for shapes that do not have an interior according toS2Shape.hasInterior().- Specified by:
containsCenterin classS2ShapeIndex.S2ClippedShape
-
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()
-