52 #include <OpenMesh/Core/System/config.h>
55 #include <OpenMesh/Core/IO/SR_store.hh>
56 #include <OpenMesh/Core/IO/IOManager.hh>
57 #include <OpenMesh/Core/IO/importer/ImporterT.hh>
58 #include <OpenMesh/Core/IO/exporter/ExporterT.hh>
96 const std::string& _filename)
99 return read_mesh(_mesh, _filename, opt,
true);
123 template <
class Mesh>
126 const std::string& _filename,
130 if (_clear) _mesh.clear();
132 return IOManager().
read(_filename, importer, _opt);
155 template <
class Mesh>
159 const std::string& _ext,
163 if (_clear) _mesh.clear();
165 return IOManager().
read(_is,_ext, importer, _opt);
189 template <
class Mesh>
191 const std::string& _filename,
193 std::streamsize _precision = 6)
196 return IOManager().
write(_filename, exporter, _opt, _precision);
221 template <
class Mesh>
224 const std::string& _ext,
226 std::streamsize _precision = 6)
229 return IOManager().
write(_os,_ext, exporter, _opt, _precision);
250 template <
class Mesh>
252 const std::string& _ext,
256 return IOManager().binary_size(_ext, exporter, _opt);
269 #if defined(OM_STATIC_BUILD) || defined(ARCH_DARWIN)
270 # include <OpenMesh/Core/IO/IOInstances.hh>
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
size_t binary_size(const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
Get binary size of data.
Definition: MeshIO.hh:251
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
This class template provides an exporter module for OpenMesh meshes.
Definition: ExporterT.hh:84
This class template provides an importer module for OpenMesh meshes.
Definition: ImporterT.hh:81
bool write(const std::string &_filename, BaseExporter &_be, Options _opt=Options::Default, std::streamsize _precision=6)
Write a mesh to file _filename.
Definition: IOManager.cc:143
bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)
Read a mesh from file _filename.
Definition: IOManager.cc:87
Set options for reader/writer modules.
Definition: Options.hh:91
@ Default
No options.
Definition: Options.hh:99
Polygonal mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:96