Interface S2ShapeAspect.VertexAspect

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.VertexAspect
A provider of S2Point given a 'vertexId', allowing alternate storage options.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of vertices.
    vertex(int vertexId)
    Returns a vertex of this shape, from 0 (inclusive) to numVertices() (exclusive).
    default List<S2Point>
    Returns the vertices in this shape.
  • Method Details

    • numVertices

      int numVertices()
      Returns the number of vertices. May be different from S2Shape.numEdges().
    • vertex

      S2Point vertex(int vertexId)
      Returns a vertex of this shape, from 0 (inclusive) to numVertices() (exclusive).
    • vertices

      default List<S2Point> vertices()
      Returns the vertices in this shape. Less efficient but may be more convenient.