S2Polygon.this - multiple declarations
Function S2Polygon.this
The default constructor creates an empty polygon. It can be made non-empty by calling Init(), Decode(), etc.
this();
Function S2Polygon.this
Convenience constructor that calls InitNested() with the given loops.
When called with override == S2Debug::ALLOW, the automatic validity checking is controlled by --s2debug (which is true by default in non-optimized builds). When this flag is enabled, a fatal error is generated whenever an invalid polygon is constructed.
With override == S2Debug::DISABLE, the automatic validity checking is disabled. The main reason to do this is if you intend to call IsValid() explicitly. (See set_s2debug_override() for details.)
Example
S2Polygon* polygon = new S2Polygon(loops, S2Debug::DISABLE);
This is equivalent to:
S2Polygon* polygon = new S2Polygon; polygon->set_s2debug_override(S2Debug::DISABLE); polygon->InitNested(loops);
Function S2Polygon.this
Convenience constructor that creates a polygon with a single loop corresponding to the given cell.
Function S2Polygon.this
Convenience constructor that calls Init(S2Loop*). Note that this method automatically converts the special empty loop (see S2Loop) into an empty polygon, unlike the vector-of-loops constructor which does not allow empty loops at all.