Пример #1
0
        //------------------------------------------------------------------------------

        private Int64 PopScanbeam()
        {
            Int64 Y = m_Scanbeam.Y;
            Scanbeam sb2 = m_Scanbeam;
            m_Scanbeam = m_Scanbeam.next;
            sb2 = null;
            return Y;
        }
Пример #2
0
        //------------------------------------------------------------------------------

        private void InsertScanbeam(Int64 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;
            }
        }
Пример #3
0
        //------------------------------------------------------------------------------

        void DisposeScanbeamList()
        {
            while (m_Scanbeam != null)
            {
                Scanbeam sb2 = m_Scanbeam.next;
                m_Scanbeam = null;
                m_Scanbeam = sb2;
            }
        }
Пример #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;
            }
        }
Пример #5
0
 public Clipper()
 {
     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<JoinRec>();
     m_HorizJoins = new List<HorzJoinRec>();
     m_ReverseOutput = false;
     m_ForceSimple = false;
 }