Package com.google.common.geometry
Interface S2ShapeAspect.ChainAspect
-
- All Known Subinterfaces:
S2LaxPolygonShape
,S2LaxPolylineShape
,S2ShapeAspect.EdgeAspect.Closed
,S2ShapeAspect.EdgeAspect.Open
,S2ShapeAspect.Mixed
- All Known Implementing Classes:
S2LaxPolygonShape.MultiArray
,S2LaxPolygonShape.MultiList
,S2LaxPolygonShape.MultiPacked
,S2LaxPolygonShape.MultiSnapped
,S2LaxPolygonShape.SimpleArray
,S2LaxPolygonShape.SimpleList
,S2LaxPolygonShape.SimplePacked
,S2LaxPolygonShape.SimpleSnapped
,S2LaxPolylineShape.MultiArray
,S2LaxPolylineShape.MultiPacked
,S2LaxPolylineShape.MultiSnapped
,S2LaxPolylineShape.SimpleArray
,S2LaxPolylineShape.SimpleList
,S2LaxPolylineShape.SimplePacked
,S2LaxPolylineShape.SimpleSnapped
,S2ShapeAspect.ChainAspect.Multi
,S2ShapeAspect.ChainAspect.Multi.Array
,S2ShapeAspect.ChainAspect.Multi.Packed
,S2ShapeAspect.ChainAspect.Multi.Snapped
,S2ShapeAspect.ChainAspect.Simple
,S2ShapeAspect.ChainAspect.Simple.Array
,S2ShapeAspect.ChainAspect.Simple.Packed
,S2ShapeAspect.ChainAspect.Simple.Snapped
- Enclosing interface:
- S2ShapeAspect
public static interface S2ShapeAspect.ChainAspect
A provider of the 'edgeId' ranges for each chain, allowing alternate chain representations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
S2ShapeAspect.ChainAspect.Multi
A sequence of chains, represented as an array of the first 'edgeId' for each chain.static class
S2ShapeAspect.ChainAspect.Simple
A single non-empty chain.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
chainId(int edgeId)
Returns the chain ID of a given edge.int
edgeId(int chainId)
Returns start edge ID of a chain, or the number of edges ifchainId==numChains()
.int
getChainLength(int chainId)
ProvidesS2Shape.getChainLength(int)
.int
getChainStart(int chainId)
ProvidesS2Shape.getChainStart(int)
.int
numChains()
ProvidesS2Shape.numChains()
.
-
-
-
Method Detail
-
chainId
int chainId(int edgeId)
Returns the chain ID of a given edge.
-
edgeId
int edgeId(int chainId)
Returns start edge ID of a chain, or the number of edges ifchainId==numChains()
.
-
numChains
int numChains()
ProvidesS2Shape.numChains()
.
-
getChainStart
int getChainStart(int chainId)
ProvidesS2Shape.getChainStart(int)
.
-
getChainLength
int getChainLength(int chainId)
ProvidesS2Shape.getChainLength(int)
.
-
-