コード例 #1
0
ファイル: Variation.cs プロジェクト: JanikScholl/myRepos
        //faceFunctions
        //public ref List<Face> GetFaces() { return ref faces; }
        //public void AddFace(Face face) { faces.Add(face); }

        /*public Face FindFace(string name)
         * {
         *  foreach (Face face in faces)
         *      if (face.GetFaceName() == name)
         *          return face;
         *  return null;
         * }*/

        /// <summary>
        /// Searches the input Face´s vertices for matches in the Globals.Vertices list and adds the face reference
        /// </summary>
        /// <param name="face"></param>
        public void SetFacesVertices(Face face)
        {
            foreach (Vertex vertex in face.GetVertices())
            {
                if (FindVertex(vertex) != null)
                {
                    FindVertex(vertex).AddFace(face);
                }
            }
        }
コード例 #2
0
ファイル: Manipulator.cs プロジェクト: JanikScholl/myRepos
        private bool FaceTouchesEdge(Face movingFace, Edge edge)
        {
            int count = 0;

            foreach (Vertex vertex in edge.GetVertices())
            {
                if (movingFace.GetVertices().Contains(vertex))
                {
                    count++;
                }
            }

            if (count == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }