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.EdgeAspectA provider of the 'vertexId' for the start and end of each 'edgeId' or 'chainId'/'edgeOffset', allowing alternate edge/vertex mappings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceS2ShapeAspect.EdgeAspect.ClosedChains are closed, that is, there is an implicit edge between the ends of each chain.static interfaceS2ShapeAspect.EdgeAspect.OpenChains are open, that is, there is no implicit edge between the ends of each chain.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadjustChains(int... chainStarts)Converts the given array of 'vertexId' values in place, yielding an array of 'edgeId' values that start each chain.voidgetChainEdge(int chainId, int edgeOffset, S2Shape.MutableEdge result)S2PointgetChainVertex(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).voidgetEdge(int edgeId, S2Shape.MutableEdge result)intnumEdges()ProvidesS2Shape.numEdges().intvertexId(int chainId, int edgeId)Returns the vertexId that starts 'edgeId', assumingedgeId(chainId) <= edgeId && edgeId < edgeId(chainId + 1).
-
-
-
Method Detail
-
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
S2Point 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).
-
numEdges
int numEdges()
ProvidesS2Shape.numEdges().
-
getEdge
void getEdge(int edgeId, S2Shape.MutableEdge result)
-
getChainEdge
void getChainEdge(int chainId, int edgeOffset, S2Shape.MutableEdge result)
-
-