TriangleMesh refactor