示例#1
0
        /**
         * \brief Returns a #pb_Face which contains the passed triangle.
         * @param tri int[] composed of three indices.
         */
        public static bool FaceWithTriangle(this pb_Object pb, int[] tri, out pb_Face face)
        {
            for (int i = 0; i < pb.faces.Length; i++)
            {
                if (pb.faces[i].Contains(tri))
                {
                    face = pb.faces[i];
                    return(true);
                }
            }

            face = null;
            return(false);
        }
示例#2
0
        public static pb_Edge[] GetPerimeterEdges(this pb_Face face)
        {
            pb_Edge[]      edges          = face.GetEdges();
            List <pb_Edge> perimeterEdges = new List <pb_Edge>();

            for (int i = 0; i < edges.Length; i++)
            {
                if (pb_Edge.ContainsDuplicateFast(edges, edges[i]))
                {
                    continue;
                }
                else
                {
                    perimeterEdges.Add(edges[i]);
                }
            }

            return(perimeterEdges.ToArray());
        }
示例#3
0
 public pb_VertexConnection(pb_Face face, List <int> indices)
 {
     this.face    = face;
     this.indices = indices;
 }
示例#4
0
 public EdgeConnection(pb_Face face, List <pb_Edge> edges)
 {
     this.face  = face;
     this.edges = edges;
 }