Esempio n. 1
0
 /// <summary>
 /// Remove all identical vertices.
 /// </summary>
 public void RemoveDuplicates()
 {
     List<Vertex> unique = new HashSet<Vertex>(Vertices).ToList();
     List<int> indicesOld = Indices;
     Indices = new List<int>();
     for (int i = 0; i < indicesOld.Count; i++)
     {
         int index = unique.FindIndex(item => item == Vertices[i]);
         Indices.Add(index);
     }
     Vertices = unique;
 }