INNER CODE UNIT · C#
numTris
Blotch3D/Blotch3D · src/BlGeometry.cs:581
var numTris = len / 3;
if (numTris * 3 != triangles.Length)
throw new Exception("BlGeometry.CullEmptyTriangles expected triangles, but the number of vertices are not divisible by three.");
for (int n = 0; n < numTris; n++)
{
var m = n * 3;
if (triangles[m].Position != triangles[m + 1].Position && triangles[m].Position != triangles[m + 2].Position && triangles[m + 1].Position != triangles[m + 2].Position)
{
newList.Add(triangles[m]);
newList.Add(triangles[m + 1]);
newList.Add(triangles[m + 2]);
}
}
len = newList.Count;