Пример #1
0
        public bool containsLine(LDIndexLine l)
        {
            if (l.hasIndex(m_index1) && l.hasIndex(m_index2))
            {
                return true;
            }
            if (l.hasIndex(m_index2) && l.hasIndex(m_index3))
            {
                return true;
            }
            if (l.hasIndex(m_index1) && l.hasIndex(m_index3))
            {
                return true;
            }

            return false;
        }
Пример #2
0
        public int getIndexWithoutLine(LDIndexLine l)
        {
            Debug.Assert(containsLine(l));

            if (!l.hasIndex(m_index1))
            {
                return(m_index1);
            }
            if (!l.hasIndex(m_index2))
            {
                return(m_index2);
            }
            if (!l.hasIndex(m_index3))
            {
                return(m_index3);
            }
            return(-1);
        }
Пример #3
0
        public bool containsLine(LDIndexLine l)
        {
            if (l.hasIndex(m_index1) && l.hasIndex(m_index2))
            {
                return(true);
            }
            if (l.hasIndex(m_index2) && l.hasIndex(m_index3))
            {
                return(true);
            }
            if (l.hasIndex(m_index1) && l.hasIndex(m_index3))
            {
                return(true);
            }

            return(false);
        }
Пример #4
0
        public LDIndexLineList getRelatedLines(int pointIndex)
        {
            LDIndexLineList result = new LDIndexLineList();

            LDIndexLine line1 = getLine1();
            LDIndexLine line2 = getLine2();
            LDIndexLine line3 = getLine3();

            if (line1.hasIndex(pointIndex))
            {
                result.Add(line1);
            }
            if (line2.hasIndex(pointIndex))
            {
                result.Add(line2);
            }
            if (line3.hasIndex(pointIndex))
            {
                result.Add(line3);
            }

            return(result);
        }
Пример #5
0
        public int getIndexWithoutLine(LDIndexLine l)
        {
            Debug.Assert(containsLine(l));

            if (!l.hasIndex(m_index1))
            {
                return m_index1;
            }
            if (!l.hasIndex(m_index2))
            {
                return m_index2;
            }
            if (!l.hasIndex(m_index3))
            {
                return m_index3;
            }
            return -1;
        }