57#include <OpenMesh/Core/System/config.h>
59#if defined (OPENMESH_TRIMESH_ARRAY_KERNEL_HH) || \
60 defined (OPENMESH_POLYMESH_ARRAY_KERNEL_HH)
61# error "Include MeshIO.hh before including a mesh type!"
64#include <OpenMesh/Core/IO/SR_store.hh>
65#include <OpenMesh/Core/IO/IOManager.hh>
66#include <OpenMesh/Core/IO/importer/ImporterT.hh>
67#include <OpenMesh/Core/IO/exporter/ExporterT.hh>
105 const std::string& _filename)
108 return read_mesh(_mesh, _filename, opt,
true);
135 const std::string& _filename,
139 if (_clear) _mesh.clear();
141 return IOManager().
read(_filename, importer, _opt);
168 const std::string& _ext,
172 if (_clear) _mesh.clear();
174 return IOManager().
read(_is,_ext, importer, _opt);
200 const std::string& _filename,
202 std::streamsize _precision = 6)
205 return IOManager().
write(_filename, exporter, _opt, _precision);
233 const std::string& _ext,
235 std::streamsize _precision = 6)
238 return IOManager().
write(_os,_ext, exporter, _opt, _precision);
261 const std::string& _ext,
265 return IOManager().binary_size(_ext, exporter, _opt);
278#if defined(OM_STATIC_BUILD) || defined(ARCH_DARWIN)
279# include <OpenMesh/Core/IO/IOInstances.hh>
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
size_t binary_size(const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
Get binary size of data.
Definition: MeshIO.hh:260
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:199
bool read_mesh(Mesh &_mesh, const std::string &_filename)
Read a mesh from file _filename.
Definition: MeshIO.hh:104
This class template provides an exporter module for OpenMesh meshes.
Definition: ExporterT.hh:88
This class template provides an importer module for OpenMesh meshes.
Definition: ImporterT.hh:86
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:148
bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)
Read a mesh from file _filename.
Definition: IOManager.cc:92
Set options for reader/writer modules.
Definition: Options.hh:96
@ Default
No options.
Definition: Options.hh:104