public void CanTruncateMesh() { // Create a simple cube PlanktonMesh pMesh = new PlanktonMesh(); pMesh.Vertices.Add(-0.5, -0.5, 0.5); pMesh.Vertices.Add(-0.5, -0.5, -0.5); pMesh.Vertices.Add(-0.5, 0.5, -0.5); pMesh.Vertices.Add(-0.5, 0.5, 0.5); pMesh.Vertices.Add(0.5, -0.5, 0.5); pMesh.Vertices.Add(0.5, -0.5, -0.5); pMesh.Vertices.Add(0.5, 0.5, -0.5); pMesh.Vertices.Add(0.5, 0.5, 0.5); pMesh.Faces.AddFace(3, 2, 1, 0); pMesh.Faces.AddFace(1, 5, 4, 0); pMesh.Faces.AddFace(2, 6, 5, 1); pMesh.Faces.AddFace(7, 6, 2, 3); pMesh.Faces.AddFace(4, 7, 3, 0); pMesh.Faces.AddFace(5, 6, 7, 4); Assert.AreEqual(6, pMesh.Faces.Count); var tMesh = pMesh.TruncateVertices(); Assert.AreEqual(pMesh.Faces.Count + pMesh.Vertices.Count, tMesh.Faces.Count); // TODO: geometrical check }