23#ifndef VCL_IO_MESH_SAVE_MESH_H
24#define VCL_IO_MESH_SAVE_MESH_H
31#include "capability.h"
54 std::set<FileFormat>
ff;
56 ff.insert(objFileFormat());
57 ff.insert(offFileFormat());
58 ff.insert(plyFileFormat());
59 ff.insert(stlFileFormat());
77template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
80 const std::string& filename,
81 const SaveSettings& settings,
86 if (ff == objFileFormat()) {
87 saveObj(m, filename, settings, log);
89 else if (ff == offFileFormat()) {
90 saveOff(m, filename, settings, log);
92 else if (ff == plyFileFormat()) {
93 savePly(m, filename, settings, log);
95 else if (ff == stlFileFormat()) {
96 saveStl(m, filename, settings, log);
99 throw UnknownFileFormatException(ff.extensions().front());
121template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
A class representing a box in N-dimensional space.
Definition box.h:46
static FileFormat fileFormat(const std::string &filename)
Get the file format of a file from its filename.
Definition file_info.h:280
NullLogger nullLogger
The nullLogger object is an object of type NullLogger that is used as default argument in the functio...
Definition null_logger.h:123
std::set< FileFormat > saveMeshFormats()
Returns the set of mesh formats supported for saving.
Definition save_mesh.h:52
The SaveSettings structure contains the settings that can be used to save a mesh to a stream/file.
Definition settings.h:62