示例#1
0
        public Edges[] EdgesForTriangle(Edges edges, Triangle triangle)//找到一个三角形的另外两条边
        {
            Edges[] ed = new Edges[2];
            Edges   e1 = new Edges(triangle.p1, triangle.p2);
            Edges   e2 = new Edges(triangle.p1, triangle.p3);
            Edges   e3 = new Edges(triangle.p2, triangle.p3);

            if (edges.Equals(e1))
            {
                ed[0] = e2;
                ed[1] = e3;
            }
            else if (edges.Equals(e2))
            {
                ed[0] = e1;
                ed[1] = e3;
            }
            else
            {
                ed[0] = e1;
                ed[1] = e2;
            }
            return(ed);
        }