37#define CLIPPER_VERSION "6.2.6"
77 typedef signed long long cInt;
97 return a.X == b.
X &&
a.Y == b.
Y;
101 return a.X != b.
X ||
a.Y != b.
Y;
106typedef std::vector< IntPoint >
Path;
112std::ostream&
operator <<(std::ostream &s,
const IntPoint &p);
126typedef void (*ZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt);
225 virtual void Clear();
232 virtual void Reset();
285 void ZFillFunction(ZFillCallback zFillFunc);
304 ZFillCallback m_ZFill;
361 ClipperOffset(
double miterLimit = 2.0,
double roundPrecision = 0.25);
394 virtual const char*
what()
const throw() {
return m_descr.c_str();}
std::priority_queue< cInt > ScanbeamList
std::vector< LocalMinimum > MinimaList
bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed)
TEdge * ProcessBound(TEdge *E, bool IsClockwise)
void DisposeLocalMinimaList()
void UpdateEdgeIntoAEL(TEdge *&e)
TEdge * AddBoundsToLML(TEdge *e, bool IsClosed)
virtual bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed)
void DeleteFromAEL(TEdge *e)
void PreserveCollinear(bool value)
void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2)
MinimaList::iterator m_CurrentLM
void InsertScanbeam(const cInt Y)
bool PopScanbeam(cInt &Y)
bool LocalMinimaPending()
void DisposeOutRec(PolyOutList::size_type index)
bool PopLocalMinima(cInt Y, const LocalMinimum *&locMin)
bool FixupIntersectionOrder()
void ProcessHorizontal(TEdge *horzEdge)
void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt)
void InsertEdgeIntoAEL(TEdge *edge, TEdge *startEdge)
bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl)
void SetWindingCount(TEdge &edge)
void InsertLocalMinimaIntoAEL(const cInt botY)
void ProcessIntersectList()
void BuildResult(Paths &polys)
bool IsContributing(const TEdge &edge) const
OutPt * AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt)
void BuildIntersectList(const cInt topY)
bool JoinPoints(Join *j, OutRec *outRec1, OutRec *outRec2)
bool Execute(ClipType clipType, Paths &solution, PolyFillType fillType=pftEvenOdd)
void AddEdgeToSEL(TEdge *edge)
void AppendPolygon(TEdge *e1, TEdge *e2)
virtual bool ExecuteInternal()
std::list< cInt > MaximaList
void ReverseSolution(bool value)
OutPt * AddOutPt(TEdge *e, const IntPoint &pt)
bool IsTopHorz(const cInt XPos)
void SetHoleState(TEdge *e, OutRec *outrec)
void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt)
OutRec * GetOutRec(int idx)
void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt)
void BuildResult2(PolyTree &polytree)
void ProcessHorizontals()
void FixupFirstLefts3(OutRec *OldOutRec, OutRec *NewOutRec)
bool IsEvenOddAltFillType(const TEdge &edge) const
void StrictlySimple(bool value)
void FixupFirstLefts2(OutRec *InnerOutRec, OutRec *OuterOutRec)
PolyFillType m_SubjFillType
void ProcessEdgesAtTopOfScanbeam(const cInt topY)
bool IsEvenOddFillType(const TEdge &edge) const
void AddGhostJoin(OutPt *op, const IntPoint offPt)
IntersectList m_IntersectList
void FixupFirstLefts1(OutRec *OldOutRec, OutRec *NewOutRec)
bool ProcessIntersections(const cInt topY)
PolyFillType m_ClipFillType
OutPt * GetLastOutPt(TEdge *e)
void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2)
void FixHoleLinkage(OutRec &outrec)
Clipper(int initOptions=0)
void DeleteFromSEL(TEdge *e)
bool PopEdgeFromSEL(TEdge *&edge)
void FixupOutPolyline(OutRec &outrec)
void FixupOutPolygon(OutRec &outrec)
void DisposeIntersectNodes()
void AddPath(const Path &path, JoinType joinType, EndType endType)
void AddPaths(const Paths &paths, JoinType joinType, EndType endType)
void DoSquare(int j, int k)
ClipperOffset(double miterLimit=2.0, double roundPrecision=0.25)
void DoOffset(double delta)
void DoRound(int j, int k)
std::vector< DoublePoint > m_normals
void OffsetPoint(int j, int &k, JoinType jointype)
void Execute(Paths &solution, double delta)
void DoMiter(int j, int k, double r)
void AddChild(PolyNode &child)
PolyNode * GetNext() const
PolyNode * GetNextSiblingUp() const
PolyNode * GetFirst() const
virtual const char * what() const
clipperException(const char *description)
virtual ~clipperException()
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
unsigned long long ulong64
void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType=pftEvenOdd)
void PolyTreeToPaths(const PolyTree &polytree, Paths &paths)
double Area(const Path &poly)
std::vector< Path > Paths
void CleanPolygons(const Paths &in_polys, Paths &out_polys, double distance=1.415)
static cInt const hiRange
void MinkowskiDiff(const Path &poly1, const Path &poly2, Paths &solution)
std::vector< Join * > JoinList
bool Orientation(const Path &poly)
void ClosedPathsFromPolyTree(const PolyTree &polytree, Paths &paths)
std::vector< TEdge * > EdgeList
std::vector< OutRec * > PolyOutList
std::vector< IntersectNode * > IntersectList
void OpenPathsFromPolyTree(PolyTree &polytree, Paths &paths)
void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType=pftEvenOdd)
void ReversePath(Path &p)
static cInt const loRange
int PointInPolygon(const IntPoint &pt, const Path &path)
std::vector< PolyNode * > PolyNodes
void MinkowskiSum(const Path &pattern, const Path &path, Paths &solution, bool pathIsClosed)
Path & operator<<(Path &poly, const IntPoint &p)
void ReversePaths(Paths &p)
void CleanPolygon(const Path &in_poly, Path &out_poly, double distance=1.415)
std::vector< IntPoint > Path
static constexpr double delta
DoublePoint(double x=0, double y=0)
friend bool operator==(const IntPoint &a, const IntPoint &b)
IntPoint(cInt x=0, cInt y=0)
friend bool operator!=(const IntPoint &a, const IntPoint &b)