#include <cmath>
#include "clipper2/clipper.h"
#include "clipper2/clipper.rectclip.h"
namespace Clipper2Lib {
inline bool Path1ContainsPath2(const Path64& path1, const Path64& path2)
{ … }
inline bool GetLocation(const Rect64& rec,
const Point64& pt, Location& loc)
{ … }
inline bool IsHorizontal(const Point64& pt1, const Point64& pt2)
{ … }
bool GetSegmentIntersection(const Point64& p1,
const Point64& p2, const Point64& p3, const Point64& p4, Point64& ip)
{ … }
inline bool GetIntersection(const Path64& rectPath,
const Point64& p, const Point64& p2, Location& loc, Point64& ip)
{ … }
inline Location GetAdjacentLocation(Location loc, bool isClockwise)
{ … }
inline bool HeadingClockwise(Location prev, Location curr)
{ … }
inline bool AreOpposites(Location prev, Location curr)
{ … }
inline bool IsClockwise(Location prev, Location curr,
const Point64& prev_pt, const Point64& curr_pt, const Point64& rect_mp)
{ … }
inline OutPt2* UnlinkOp(OutPt2* op)
{ … }
inline OutPt2* UnlinkOpBack(OutPt2* op)
{ … }
inline uint32_t GetEdgesForPt(const Point64& pt, const Rect64& rec)
{ … }
inline bool IsHeadingClockwise(const Point64& pt1, const Point64& pt2, int edgeIdx)
{ … }
inline bool HasHorzOverlap(const Point64& left1, const Point64& right1,
const Point64& left2, const Point64& right2)
{ … }
inline bool HasVertOverlap(const Point64& top1, const Point64& bottom1,
const Point64& top2, const Point64& bottom2)
{ … }
inline void AddToEdge(OutPt2List& edge, OutPt2* op)
{ … }
inline void UncoupleEdge(OutPt2* op)
{ … }
inline void SetNewOwner(OutPt2* op, size_t new_idx)
{ … }
OutPt2* RectClip64::Add(Point64 pt, bool start_new)
{ … }
void RectClip64::AddCorner(Location prev, Location curr)
{ … }
void RectClip64::AddCorner(Location& loc, bool isClockwise)
{ … }
void RectClip64::GetNextLocation(const Path64& path,
Location& loc, size_t& i, size_t highI)
{ … }
bool StartLocsAreClockwise(const std::vector<Location>& startlocs)
{ … }
void RectClip64::ExecuteInternal(const Path64& path)
{ … }
void RectClip64::CheckEdges()
{ … }
void RectClip64::TidyEdges(size_t idx, OutPt2List& cw, OutPt2List& ccw)
{ … }
Path64 RectClip64::GetPath(OutPt2*& op)
{ … }
Paths64 RectClip64::Execute(const Paths64& paths)
{ … }
Paths64 RectClipLines64::Execute(const Paths64& paths)
{ … }
void RectClipLines64::ExecuteInternal(const Path64& path)
{ … }
Path64 RectClipLines64::GetPath(OutPt2*& op)
{ … }
}