godot/thirdparty/clipper2/include/clipper2/clipper.engine.h

/*******************************************************************************
* Author    :  Angus Johnson                                                   *
* Date      :  5 July 2024                                                     *
* Website   :  http://www.angusj.com                                           *
* Copyright :  Angus Johnson 2010-2024                                         *
* Purpose   :  This is the main polygon clipping module                        *
* License   :  http://www.boost.org/LICENSE_1_0.txt                            *
*******************************************************************************/

#ifndef CLIPPER_ENGINE_H
#define CLIPPER_ENGINE_H

#include <cstdlib>
#include <stdint.h> //#541
#include <iostream>
#include <queue>
#include <vector>
#include <functional>
#include <numeric>
#include <memory>

#include "clipper2/clipper.core.h"

namespace Clipper2Lib {

	struct Scanline;
	struct IntersectNode;
	struct Active;
	struct Vertex;
	struct LocalMinima;
	struct OutRec;
	struct HorzSegment;

	//Note: all clipping operations except for Difference are commutative.
	enum class ClipType {};

	enum class PathType {};
	enum class JoinWith {};

	enum class VertexFlags : uint32_t {};

	constexpr enum VertexFlags operator &(enum VertexFlags a, enum VertexFlags b)
	{}

	constexpr enum VertexFlags operator |(enum VertexFlags a, enum VertexFlags b)
	{}

	struct Vertex {};

	struct OutPt {};

	class PolyPath;
	class PolyPath64;
	class PolyPathD;
	PolyTree64;
	PolyTreeD;

	struct OutRec;
	OutRecList;

	//OutRec: contains a path in the clipping solution. Edges in the AEL will
	//have OutRec pointers assigned when they form part of the clipping solution.
	struct OutRec {};

	///////////////////////////////////////////////////////////////////
	//Important: UP and DOWN here are premised on Y-axis positive down
	//displays, which is the orientation used in Clipper's development.
	///////////////////////////////////////////////////////////////////

	struct Active {};

	struct LocalMinima {};

	struct IntersectNode {};

	struct HorzSegment {};

	struct HorzJoin {};

#ifdef USINGZ
		typedef std::function<void(const Point64& e1bot, const Point64& e1top,
		const Point64& e2bot, const Point64& e2top, Point64& pt)> ZCallback64;

	typedef std::function<void(const PointD& e1bot, const PointD& e1top,
		const PointD& e2bot, const PointD& e2top, PointD& pt)> ZCallbackD;
#endif

	HorzSegmentList;
	LocalMinima_ptr;
	LocalMinimaList;
	IntersectNodeList;

	// ReuseableDataContainer64 ------------------------------------------------

	class ReuseableDataContainer64 {};

	// ClipperBase -------------------------------------------------------------

	class ClipperBase {};

	// PolyPath / PolyTree --------------------------------------------------------

	//PolyTree: is intended as a READ-ONLY data structure for CLOSED paths returned
	//by clipping operations. While this structure is more complex than the
	//alternative Paths structure, it does preserve path 'ownership' - ie those
	//paths that contain (or own) other paths. This will be useful to some users.

	class PolyPath {};

	PolyPath64List;
	PolyPathDList;

	class PolyPath64 : public PolyPath {};

	class PolyPathD : public PolyPath {};

	class Clipper64 : public ClipperBase
	{};

	class ClipperD : public ClipperBase {};

}  // namespace

#endif  // CLIPPER_ENGINE_H