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.
  • Method Details

    • vertexId

      int vertexId(int chainId, int edgeId)
      Returns the vertexId that starts 'edgeId', assuming edgeId(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 by S2Shape.getChainEdge(int, int, S2Shape.MutableEdge), or the endpoint of the last edge if edgeOffset==getChainLength(chainId).
    • numEdges

      int numEdges()
    • getEdge

      void getEdge(int edgeId, S2Shape.MutableEdge result)
    • getChainEdge

      void getChainEdge(int chainId, int edgeOffset, S2Shape.MutableEdge result)