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> 102 template <
class Mesh>
105 const std::string& _filename)
108 return read_mesh(_mesh, _filename, opt,
true);
132 template <
class Mesh>
135 const std::string& _filename,
139 if (_clear) _mesh.clear();
164 template <
class Mesh>
168 const std::string& _ext,
172 if (_clear) _mesh.clear();
198 template <
class Mesh>
200 const std::string& _filename,
202 std::streamsize _precision = 6)
230 template <
class Mesh>
233 const std::string& _ext,
235 std::streamsize _precision = 6)
259 template <
class Mesh>
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>
bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)
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.
size_t binary_size(const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
Get binary size of data.
Set options for reader/writer modules.
_IOManager_ & IOManager()
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.