55 #if defined (OPENMESH_TRIMESH_ARRAY_KERNEL_HH) || \ 56 defined (OPENMESH_POLYMESH_ARRAY_KERNEL_HH) 64 #pragma message("MeshIO.hh was included after Mesh Type. You may ignore this warning. Please report errors resulting ifrom this order to the developers!") 66 #warning "MeshIO.hh was included after Mesh Type. You may ignore this warning. Please report errors resulting from this order to the developers!" 72 #include <OpenMesh/Core/IO/SR_store.hh> 73 #include <OpenMesh/Core/IO/IOManager.hh> 74 #include <OpenMesh/Core/IO/importer/ImporterT.hh> 75 #include <OpenMesh/Core/IO/exporter/ExporterT.hh> 110 template <
class Mesh>
113 const std::string& _filename)
116 return read_mesh(_mesh, _filename, opt,
true);
140 template <
class Mesh>
143 const std::string& _filename,
147 if (_clear) _mesh.clear();
172 template <
class Mesh>
176 const std::string& _ext,
180 if (_clear) _mesh.clear();
206 template <
class Mesh>
208 const std::string& _filename,
210 std::streamsize _precision = 6)
238 template <
class Mesh>
241 const std::string& _ext,
243 std::streamsize _precision = 6)
267 template <
class Mesh>
269 const std::string& _ext,
273 return IOManager().binary_size(_ext, exporter, _opt);
286 #if defined(OM_STATIC_BUILD) || defined(ARCH_DARWIN) 287 # 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.
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.
_IOManager_ & IOManager()
bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)
Set options for reader/writer modules.
bool write(const std::string &_filename, BaseExporter &_be, Options _opt=Options::Default, std::streamsize _precision=6)
bool read_mesh(Mesh &_mesh, const std::string &_filename)
Read a mesh from file _filename.