Developer Documentation
Loading...
Searching...
No Matches
mesh_io.cc
1#include <OpenMesh/Core/IO/MeshIO.hh>
2
3MyMesh mesh;
4
5if (!OpenMesh::IO::read_mesh(mesh, "some input file"))
6{
7 std::cerr << "read error\n";
8 exit(1);
9}
10
11// do something with your mesh ...
12
13if (!OpenMesh::IO::write_mesh(mesh, "some output file"))
14{
15 std::cerr << "write error\n";
16 exit(1);
17}
bool write_mesh(const Mesh &_mesh, const std::string &_filename, Options _opt=Options::Default, std::streamsize _precision=6)
Write a mesh to the file _filename.
Definition MeshIO.hh:190
bool read_mesh(Mesh &_mesh, const std::string &_filename)
Read a mesh from file _filename.
Definition MeshIO.hh:95