S2ShapeIndex is an abstract base class for indexing polygonal geometry in memory. The objects in the index are known as "shapes", and may consist of points, polylines, and/or polygons, possibly overlapping. The index makes it very fast to answer queries such as finding nearby shapes, measuring distances, testing for intersection and containment, etc.
S2ClippedShape represents the part of a shape that intersects an S2Cell. It consists of the set of edge ids that intersect that cell, and a boolean indicating whether the center of the cell is inside the shape (for shapes that have an interior).