Siv3D/src/ThirdParty/clip2tri/clip2tri.cpp
bool MergePolysToPolyTree(const Array<Array<Vec2>>& inputPolygons, PolyTree& solution)
	{
		Paths input = UpscaleClipperPoints(inputPolygons);

		// Fire up clipper and union!
		Clipper clipper;
		clipper.StrictlySimple(true);

		try  // there is a "throw" in AddPolygon
		{
			clipper.AddPaths(input, ptSubject, true);
		}
		catch (...)
		{
			printf("clipper.AddPaths, something went wrong\n");
		}

		return clipper.Execute(ctUnion, solution, pftNonZero, pftNonZero);
	}
// Use Clipper to merge inputPolygons, placing the result in a Polytree
// NOTE: this does NOT downscale the Clipper points.  You must do this afterwards
//
// Here you add all your non-navigatable objects (e.g. walls, barriers, etc.)
Use Clipper to merge inputPolygons, placing the result in a Polytree
NOTE: this does NOT downscale the Clipper points.  You must do this afterwards

Here you add all your non-navigatable objects
Use Clipper to merge inputPolygons placing the result in a Polytree NOTE : this does NOT downscale the Clipper points . You must do this afterwards Here you add all your non - navigatable objects
bool MergePolysToPolyTree(const Array<Array<Vec2>>& inputPolygons, PolyTree& solution)
	{
		Paths input = UpscaleClipperPoints(inputPolygons);
		Clipper clipper;
		clipper.StrictlySimple(true);
		try  
		{
			clipper.AddPaths(input, ptSubject, true);
		}
		catch (...)
		{
			printf("clipper.AddPaths, something went wrong\n");
		}
		return clipper.Execute(ctUnion, solution, pftNonZero, pftNonZero);
	}
bool MergePolysToPolyTree ( const Array < Array < Vec2 > > & inputPolygons , PolyTree & solution ) { Paths input = UpscaleClipperPoints ( inputPolygons ) ; Clipper clipper ; clipper . StrictlySimple ( true ) ; try { clipper . AddPaths ( input , ptSubject , true ) ; } catch ( ... ) { printf ( " \n " ) ; } return clipper . Execute ( ctUnion , solution , pftNonZero , pftNonZero ) ; }
Use Clipper to merge inputPolygons, placing the result in a Polytree
NOTE: this does NOT downscale the Clipper points.
Use Clipper to merge inputPolygons placing the result in a Polytree NOTE : this does NOT downscale the Clipper points .
// Fire up clipper and union! // there is a "throw" in AddPolygon