Package com.google.common.geometry
Interface S2ShapeAspect.EdgeAspect
- 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.EdgeAspect
A provider of the 'vertexId' for the start and end of each 'edgeId' or 'chainId'/'edgeOffset',
allowing alternate edge/vertex mappings.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Chains are closed, that is, there is an implicit edge between the ends of each chain.static interface
Chains are open, that is, there is no implicit edge between the ends of each chain. -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustChains
(int... chainStarts) Converts the given array of 'vertexId' values in place, yielding an array of 'edgeId' values that start each chain.void
getChainEdge
(int chainId, int edgeOffset, S2Shape.MutableEdge result) getChainVertex
(int chainId, int edgeOffset) Returns the start point of the edge that would be returned byS2Shape.getChainEdge(int, int, com.google.common.geometry.S2Shape.MutableEdge)
, or the endpoint of the last edge ifedgeOffset==getChainLength(chainId)
.void
getEdge
(int edgeId, S2Shape.MutableEdge result) int
numEdges()
ProvidesS2Shape.numEdges()
.int
vertexId
(int chainId, int edgeId) Returns the vertexId that starts 'edgeId', assumingedgeId(chainId) <= edgeId && edgeId < edgeId(chainId + 1)
.
-
Method Details
-
vertexId
int vertexId(int chainId, int edgeId) Returns the vertexId that starts 'edgeId', assumingedgeId(chainId) <= edgeId && edgeId < edgeId(chainId + 1)
. -
adjustChains
void adjustChains(int... chainStarts) Converts the given array of 'vertexId' values in place, yielding an array of 'edgeId' values that start each chain. This requires knowledge of the edge/vertex mapping, and hence this aspect of S2Shape construction is delegated here. -
getChainVertex
Returns the start point of the edge that would be returned byS2Shape.getChainEdge(int, int, com.google.common.geometry.S2Shape.MutableEdge)
, or the endpoint of the last edge ifedgeOffset==getChainLength(chainId)
. -
numEdges
int numEdges()ProvidesS2Shape.numEdges()
. -
getEdge
-
getChainEdge
-