Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2015-01-18 02:56:12 +0300
committerAlessandro Ranellucci <aar@cpan.org>2015-01-18 03:07:23 +0300
commite6c022a61c6754e3b3b0654139b7e1f18da31fab (patch)
treec5cbcd3a44b6e205b394680dac2362e226fdbfa4 /xs/src/clipper.hpp
parent357f10732adb9d437d8700e824286ee7f7d57361 (diff)
Updated Clipper to 6.2.7
Diffstat (limited to 'xs/src/clipper.hpp')
-rw-r--r--xs/src/clipper.hpp50
1 files changed, 29 insertions, 21 deletions
diff --git a/xs/src/clipper.hpp b/xs/src/clipper.hpp
index 6d841611b..27db78f4a 100644
--- a/xs/src/clipper.hpp
+++ b/xs/src/clipper.hpp
@@ -1,10 +1,10 @@
/*******************************************************************************
* *
* Author : Angus Johnson *
-* Version : 6.2.1 *
-* Date : 31 October 2014 *
+* Version : 6.2.7 *
+* Date : 17 January 2015 *
* Website : http://www.angusj.com *
-* Copyright : Angus Johnson 2010-2014 *
+* Copyright : Angus Johnson 2010-2015 *
* *
* License: *
* Use, modification & distribution is subject to Boost Software License Ver 1. *
@@ -34,7 +34,7 @@
#ifndef clipper_hpp
#define clipper_hpp
-#define CLIPPER_VERSION "6.2.0"
+#define CLIPPER_VERSION "6.2.6"
//use_int32: When enabled 32bit ints are used instead of 64bit ints. This
//improve performance but coordinate values are limited to the range +/- 46340
@@ -50,6 +50,7 @@
//#define use_deprecated
#include <vector>
+#include <list>
#include <set>
#include <stdexcept>
#include <cstring>
@@ -200,7 +201,6 @@ enum EdgeSide { esLeft = 1, esRight = 2};
struct TEdge;
struct IntersectNode;
struct LocalMinimum;
-struct Scanbeam;
struct OutPt;
struct OutRec;
struct Join;
@@ -232,7 +232,6 @@ protected:
void PopLocalMinima();
virtual void Reset();
TEdge* ProcessBound(TEdge* E, bool IsClockwise);
- void DoMinimaLML(TEdge* E1, TEdge* E2, bool IsClosed);
TEdge* DescendToMin(TEdge *&E);
void AscendToMax(TEdge *&E, bool Appending, bool IsClosed);
@@ -253,14 +252,20 @@ public:
Clipper(int initOptions = 0);
~Clipper();
bool Execute(ClipType clipType,
- Paths &solution,
- PolyFillType subjFillType = pftEvenOdd,
- PolyFillType clipFillType = pftEvenOdd);
+ Paths &solution,
+ PolyFillType fillType = pftEvenOdd);
bool Execute(ClipType clipType,
- PolyTree &polytree,
- PolyFillType subjFillType = pftEvenOdd,
- PolyFillType clipFillType = pftEvenOdd);
- bool ReverseSolution() {return m_ReverseOutput;};
+ Paths &solution,
+ PolyFillType subjFillType,
+ PolyFillType clipFillType);
+ bool Execute(ClipType clipType,
+ PolyTree &polytree,
+ PolyFillType fillType = pftEvenOdd);
+ bool Execute(ClipType clipType,
+ PolyTree &polytree,
+ PolyFillType subjFillType,
+ PolyFillType clipFillType);
+ bool ReverseSolution() { return m_ReverseOutput; };
void ReverseSolution(bool value) {m_ReverseOutput = value;};
bool StrictlySimple() {return m_StrictSimple;};
void StrictlySimple(bool value) {m_StrictSimple = value;};
@@ -272,13 +277,15 @@ protected:
void Reset();
virtual bool ExecuteInternal();
private:
- PolyOutList m_PolyOuts;
- JoinList m_Joins;
- JoinList m_GhostJoins;
- IntersectList m_IntersectList;
- ClipType m_ClipType;
+ PolyOutList m_PolyOuts;
+ JoinList m_Joins;
+ JoinList m_GhostJoins;
+ IntersectList m_IntersectList;
+ ClipType m_ClipType;
typedef std::priority_queue<cInt> ScanbeamList;
- ScanbeamList m_Scanbeam;
+ ScanbeamList m_Scanbeam;
+ typedef std::list<cInt> MaximaList;
+ MaximaList m_Maxima;
TEdge *m_ActiveEdges;
TEdge *m_SortedEdges;
bool m_ExecuteLocked;
@@ -307,8 +314,8 @@ private:
bool IsTopHorz(const cInt XPos);
void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2);
void DoMaxima(TEdge *e);
- void ProcessHorizontals(bool IsTopOfScanbeam);
- void ProcessHorizontal(TEdge *horzEdge, bool isTopOfScanbeam);
+ void ProcessHorizontals();
+ void ProcessHorizontal(TEdge *horzEdge);
void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
OutRec* GetOutRec(int idx);
@@ -316,6 +323,7 @@ private:
void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt);
OutRec* CreateOutRec();
OutPt* AddOutPt(TEdge *e, const IntPoint &pt);
+ OutPt* GetLastOutPt(TEdge *e);
void DisposeAllOutRecs();
void DisposeOutRec(PolyOutList::size_type index);
bool ProcessIntersections(const cInt topY);