public TriangleIndices[] TrianglesByFace(HalfAxis.HAxis axis) { TriangleIndices[] tri = new TriangleIndices[2]; ulong n = (ulong)axis; switch (axis) { case HalfAxis.HAxis.AXIS_X_N: tri[0] = new TriangleIndices(0, 4, 3, n, n, n, 1, 2, 0); tri[1] = new TriangleIndices(3, 4, 7, n, n, n, 0, 2, 3); break; case HalfAxis.HAxis.AXIS_X_P: tri[0] = new TriangleIndices(1, 2, 5, n, n, n, 0, 1, 3); tri[1] = new TriangleIndices(5, 2, 6, n, n, n, 3, 1, 2); break; case HalfAxis.HAxis.AXIS_Y_N: tri[0] = new TriangleIndices(0, 1, 4, n, n, n, 0, 1, 3); tri[1] = new TriangleIndices(4, 1, 5, n, n, n, 3, 1, 2); break; case HalfAxis.HAxis.AXIS_Y_P: tri[0] = new TriangleIndices(7, 6, 2, n, n, n, 2, 3, 0); tri[1] = new TriangleIndices(7, 2, 3, n, n, n, 2, 0, 1); break; case HalfAxis.HAxis.AXIS_Z_N: tri[0] = new TriangleIndices(0, 3, 1, n, n, n, 2, 0, 3); tri[1] = new TriangleIndices(1, 3, 2, n, n, n, 3, 0, 1); break; case HalfAxis.HAxis.AXIS_Z_P: tri[0] = new TriangleIndices(4, 5, 7, n, n, n, 0, 1, 2); tri[1] = new TriangleIndices(7, 5, 6, n, n, n, 2, 1, 3); break; default: Debug.Assert(false); break; } return tri; }