Exemplo n.º 1
0
		//------------------------------------------------------------------------------
		
		private cInt PopScanbeam()
		{
			cInt Y = m_Scanbeam.Y;
			m_Scanbeam = m_Scanbeam.Next;
			return Y;
		}
Exemplo n.º 2
0
		//------------------------------------------------------------------------------
		
		private void InsertScanbeam(cInt Y)
		{
			if( m_Scanbeam == null )
			{
				m_Scanbeam = new Scanbeam();
				m_Scanbeam.Next = null;
				m_Scanbeam.Y = Y;
			}
			else if(  Y > m_Scanbeam.Y )
			{
				Scanbeam newSb = new Scanbeam();
				newSb.Y = Y;
				newSb.Next = m_Scanbeam;
				m_Scanbeam = newSb;
			} else
			{
				Scanbeam sb2 = m_Scanbeam;
				while( sb2.Next != null  && ( Y <= sb2.Next.Y ) ) sb2 = sb2.Next;
				if(  Y == sb2.Y ) return; //ie ignores duplicates
				Scanbeam newSb = new Scanbeam();
				newSb.Y = Y;
				newSb.Next = sb2.Next;
				sb2.Next = newSb;
			}
		}
Exemplo n.º 3
0
		//------------------------------------------------------------------------------
		
		void DisposeScanbeamList()
		{
			while ( m_Scanbeam != null ) {
				Scanbeam sb2 = m_Scanbeam.Next;
				m_Scanbeam = null;
				m_Scanbeam = sb2;
			}
		}
Exemplo n.º 4
0
		//------------------------------------------------------------------------------
		
		protected override void Reset() 
		{
			base.Reset();
			m_Scanbeam = null;
			m_ActiveEdges = null;
			m_SortedEdges = null;
			DisposeAllPolyPts();
			LocalMinima lm = m_MinimaList;
			while (lm != null)
			{
				InsertScanbeam(lm.Y);
				lm = lm.Next;
			}
		}
Exemplo n.º 5
0
		public Clipper(int InitOptions = 0): base() //constructor
		{
			m_Scanbeam = null;
			m_ActiveEdges = null;
			m_SortedEdges = null;
			m_IntersectNodes = null;
			m_ExecuteLocked = false;
			m_UsingPolyTree = false;
			m_PolyOuts = new List<OutRec>();
			m_Joins = new List<Join>();
			m_GhostJoins = new List<Join>();
			ReverseSolution = (ioReverseSolution & InitOptions) != 0;
			StrictlySimple = (ioStrictlySimple & InitOptions) != 0;
			PreserveCollinear = (ioPreserveCollinear & InitOptions) != 0;
			#if use_xyz
			ZFillFunction = null;
			#endif
		}