Class S2Polygon.Shape

Wrapper class for indexing a polygon (see S2ShapeIndex). Once this object is inserted into an S2ShapeIndex it is owned by that index, and will be automatically deleted when no longer needed by the index. Note that this class does not take ownership of the polygon itself (see OwningShape below). You can also subtype this class to store additional data (see S2Shape for details).

class Shape
  : S2Shape ;

Note that unlike S2Polygon, the edges of S2Polygon::Shape are directed such that the polygon interior is always on the left.

Constructors

NameDescription
this (polygon) Initialization. Does not take ownership of "polygon". May be called more than once. TODO(ericv/jrosenstock): Make "polygon" a const reference.

Methods

NameDescription
numEdges () S2Shape interface: