S2Polygon.contains - multiple declarations

Function S2Polygon.contains

Return true if this polygon contains the given other polygon, i.e. if polygon A contains all points contained by polygon B.

bool contains (
  S2Polygon b
);

Function S2Polygon.contains

Return true if this polygon contains the given polyline. This method returns an exact result, according to the following model:

bool contains (
  in const(s2.s2polyline.S2Polyline) b
);

- All edges are geodesics (of course).

- Vertices are ignored for the purposes of defining containment. (This is because polygons often do not contain their vertices, in order to that when a set of polygons tiles the sphere then every point is contained by exactly one polygon.)

- Points that lie exactly on geodesic edges are resolved using symbolic perturbations (i.e., they are considered to be infinitesmally offset from the edge).

- If the polygon and polyline share an edge, it is handled as follows. First, the polygon edges are oriented so that the interior is always on the left. Then the shared polyline edge is contained if and only if it is in the same direction as the corresponding polygon edge. (This model ensures that when a polyline is intersected with a polygon and its complement, the edge only appears in one of the two results.)

TODO(ericv): Update the implementation to correspond to the model above.

Function S2Polygon.contains

The point 'p' does not need to be normalized.

override bool contains (
  in const(s2.util.math.vector.Vector!(double,3L)) p
);