Package com.google.common.geometry
Class S2ShapeIndex.Cell.BinaryCell
java.lang.Object
com.google.common.geometry.S2ShapeIndex.Cell
com.google.common.geometry.S2ShapeIndex.Cell.BinaryCell
- All Implemented Interfaces:
S2Iterator.Entry,Serializable
- Enclosing class:
S2ShapeIndex.Cell
A specialization of Cell for the case of two clipped shapes. Also very common.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final S2ShapeIndex.S2ClippedShapeprivate final S2ShapeIndex.S2ClippedShape -
Constructor Summary
ConstructorsConstructorDescriptionBinaryCell(S2ShapeIndex.S2ClippedShape shape1, S2ShapeIndex.S2ClippedShape shape2) -
Method Summary
Modifier and TypeMethodDescriptionclipped(int i) Returns the clipped shape at the given index.intReturns the number of clipped shapes in this cell.Methods inherited from class com.google.common.geometry.S2ShapeIndex.Cell
create, findClipped, id
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
shape1
-
shape2
-
-
Constructor Details
-
BinaryCell
BinaryCell(S2ShapeIndex.S2ClippedShape shape1, S2ShapeIndex.S2ClippedShape shape2)
-
-
Method Details
-
numShapes
public int numShapes()Description copied from class:S2ShapeIndex.CellReturns the number of clipped shapes in this cell.- Specified by:
numShapesin classS2ShapeIndex.Cell
-
clipped
Description copied from class:S2ShapeIndex.CellReturns the clipped shape at the given index.- Specified by:
clippedin classS2ShapeIndex.Cell- Parameters:
i- must be at least 0 and less thanS2ShapeIndex.Cell.numShapes()
-