57 #include <OpenMesh/Core/System/config.h> 60 #if defined (OPENMESH_TRIMESH_ARRAY_KERNEL_HH) || \ 61 defined (OPENMESH_POLYMESH_ARRAY_KERNEL_HH) 69 #pragma message("MeshIO.hh was included after Mesh Type. You may ignore this warning. Please report errors resulting ifrom this order to the developers!") 71 #warning "MeshIO.hh was included after Mesh Type. You may ignore this warning. Please report errors resulting from this order to the developers!" 77 #include <OpenMesh/Core/IO/SR_store.hh> 78 #include <OpenMesh/Core/IO/IOManager.hh> 79 #include <OpenMesh/Core/IO/importer/ImporterT.hh> 80 #include <OpenMesh/Core/IO/exporter/ExporterT.hh> 115 template <
class Mesh>
118 const std::string& _filename)
121 return read_mesh(_mesh, _filename, opt,
true);
145 template <
class Mesh>
148 const std::string& _filename,
152 if (_clear) _mesh.clear();
154 return IOManager().
read(_filename, importer, _opt);
177 template <
class Mesh>
181 const std::string& _ext,
185 if (_clear) _mesh.clear();
187 return IOManager().
read(_is,_ext, importer, _opt);
211 template <
class Mesh>
213 const std::string& _filename,
215 std::streamsize _precision = 6)
218 return IOManager().
write(_filename, exporter, _opt, _precision);
243 template <
class Mesh>
246 const std::string& _ext,
248 std::streamsize _precision = 6)
251 return IOManager().
write(_os,_ext, exporter, _opt, _precision);
272 template <
class Mesh>
274 const std::string& _ext,
278 return IOManager().binary_size(_ext, exporter, _opt);
291 #if defined(OM_STATIC_BUILD) || defined(ARCH_DARWIN) 292 # include <OpenMesh/Core/IO/IOInstances.hh> size_t binary_size(const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
Get binary size of data.
Definition: MeshIO.hh:273
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
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:212
This class template provides an exporter module for OpenMesh meshes.
Definition: ExporterT.hh:87
No options.
Definition: Options.hh:104
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
This class template provides an importer module for OpenMesh meshes.
Definition: ImporterT.hh:85
Set options for reader/writer modules.
Definition: Options.hh:95
bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)
Read a mesh from file _filename.
Definition: IOManager.cc:92
bool read_mesh(Mesh &_mesh, const std::string &_filename)
Read a mesh from file _filename.
Definition: MeshIO.hh:117