Пример #1
0
    public void AddToBlockEdge_Tri(CTRI tri_B, int iSeqTri)
    {
        if (m_listSeqBlockTri.Count > 0)
        {
            if (-1 < m_listSeqBlockTri.BinarySearch(iSeqTri))
            {
                return;
            }
        } // if (m_listSeqBlockTri.Count > 0)

        EDGE__ edge01 = new EDGE__(tri_B._arrv3PT[0], tri_B._arrv3PT[1]);
        EDGE__ edge12 = new EDGE__(tri_B._arrv3PT[1], tri_B._arrv3PT[2]);
        EDGE__ edge20 = new EDGE__(tri_B._arrv3PT[2], tri_B._arrv3PT[0]);

        AddToBlockEdge(edge01);
        AddToBlockEdge(edge12);
        AddToBlockEdge(edge20);
    } // void AddToBlockEdgeTri(CTRI tri_B)
Пример #2
0
    void AddToBlockEdge(EDGE__ edgeInsert)
    {
        bool bExistSameEdge = false;

        foreach (EDGE__ edgeBlockIter in m_listEdgeBlock_)
        {
            if (edgeBlockIter == edgeInsert)
            {
                bExistSameEdge = true;
                break;
            }
        } // foreach (EDGE__ edgeBlockIter in m_listEdgeBlock_)

        //@ check overlap
        if (false == bExistSameEdge)
        {
            m_listEdgeBlock_.Add(edgeInsert);
        } // if (false == bExistSameEdge)
    }     // void AddToBlockEdge(EDGE__ edgeInsert)
Пример #3
0
        } // public void SetEdge(Vector2 v2Pnt0_, Vector2 v2Pnt1_)

        //@ Check cross edge
        public bool DoesCrossEdge2D(EDGE__ edgeRight)
        {
            return(CMATH.lineCross2D(_v2Pnt0, _v2Pnt1, edgeRight._v2Pnt0, edgeRight._v2Pnt1));
        } // public bool IsCrossEdge(EDGE__)
Пример #4
0
    }     // void AddToBlockEdge(EDGE__ edgeInsert)

    public void AddToBlockEdge(Vector3 v3Pnt0_, Vector3 v3Pnt1_)
    {
        EDGE__ edgeBlock = new EDGE__(v3Pnt0_, v3Pnt1_);

        AddToBlockEdge(edgeBlock);
    }