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 ClassesModifier and TypeInterfaceDescriptionstatic classA sequence of chains, represented as an array of the first 'edgeId' for each chain.static classA single non-empty chain. -
Method Summary
Modifier and TypeMethodDescriptionintchainId(int edgeId) Returns the chain ID of a given edge.intedgeId(int chainId) Returns start edge ID of a chain, or the number of edges ifchainId==numChains().intgetChainLength(int chainId) ProvidesS2Shape.getChainLength(int).intgetChainStart(int chainId) ProvidesS2Shape.getChainStart(int).intProvidesS2Shape.numChains().
-
Method Details
-
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).
-