Ejemplo n.º 1
0
 public void AddTriangle(int[] triangle)
 {
     for (int index = 0; index < triangle.Length; index++)
     {
         partialTriangles.Add(triangle[index]);
         if (!map.IsOldIndexInLookUp(triangle[index]))
         {
             map.AddOldIndex(triangle[index]);
         }
         int newIndex = map.FindValue(triangle[index]);
         newTriangles.Add(newIndex);
     }
 }
 public void AddArrays(int[] triangle, Vector3[] vs, Vector3[] ns, Color[] cs, int[] ts)
 {
     for (int index = 0; index < triangle.Length; index++)
     {
         int vertexIndex = triangle[index];
         if (!map.IsOldIndexInLookUp(vertexIndex))
         {
             // vertexIndex is new to this BoundHolder
             map.AddOldIndex(vertexIndex);
             partialVertices.Add(vs[vertexIndex]);
             partialNormals.Add(ns[vertexIndex]);
             if (cs.Length != 0)
             {
                 partialColor.Add(cs[vertexIndex]);
             }
         }
         int newIndex = map.FindValue(triangle[index]);
         newTriangles.Add(newIndex);
     }
 }