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.)

  1. this()
  2. this(S2Loop[] loops, S2Debug s2debugOverride)
    class S2Polygon
  3. this(S2Cell cell)
  4. this(S2Loop loop, S2Debug s2debugOverride)

Examples

S2Polygon* polygon = new S2Polygon(loops, S2Debug::DISABLE);

This is equivalent to:

S2Polygon* polygon = new S2Polygon; polygon->set_s2debug_override(S2Debug::DISABLE); polygon->InitNested(loops);

Meta