23#ifndef VCL_IO_MESH_LOAD_MESH_H
24#define VCL_IO_MESH_LOAD_MESH_H
31#ifdef VCLIB_WITH_TINYGLTF
35#include "capability.h"
59 std::set<FileFormat>
ff;
61 ff.insert(objFileFormat());
62 ff.insert(offFileFormat());
63 ff.insert(plyFileFormat());
64 ff.insert(stlFileFormat());
66#ifdef VCLIB_WITH_TINYGLTF
67 ff.insert(gltfFileFormat());
94template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
106 if (
ff == objFileFormat()) {
109 else if (
ff == offFileFormat()) {
112 else if (
ff == plyFileFormat()) {
115 else if (
ff == stlFileFormat()) {
118#ifdef VCLIB_WITH_TINYGLTF
119 else if (
ff == gltfFileFormat()) {
149template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
179template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
209template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
241template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
274template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
305template<MeshConcept MeshType, LoggerConcept LogType = NullLogger>
334template<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
A simple class that allows to store which elements and their components have been imported/loaded or ...
Definition mesh_info.h:76
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
void loadPly(MeshType &m, std::istream &inputPlyStream, MeshInfo &loadedInfo, const LoadSettings &settings=LoadSettings(), LogType &log=nullLogger)
Loads from the given input ply stream and puts the content into the mesh m.
Definition load.h:159
void loadObj(MeshType &m, std::istream &inputObjStream, const std::vector< std::istream * > &inputMtlStreams, MeshInfo &loadedInfo, const LoadSettings &settings=LoadSettings(), LogType &log=nullLogger)
Loads from the given input obj stream and puts the content into the mesh m.
Definition load.h:712
void loadOff(MeshType &m, std::istream &inputOffStream, MeshInfo &loadedInfo, const LoadSettings &settings=LoadSettings(), LogType &log=nullLogger)
Loads from the given input off stream and puts the content into the mesh m.
Definition load.h:510
std::set< FileFormat > loadMeshFormats()
Returns the set of mesh formats supported for loading a single Mesh from file.
Definition load_mesh.h:57
void loadMesh(MeshType &m, const std::string &filename, MeshInfo &loadedInfo, const LoadSettings &settings, LogType &log=nullLogger)
Loads a mesh from a file with the given filename and stores it in the given mesh object....
Definition load_mesh.h:95
void loadStl(MeshType &m, std::istream &inputStlStream, MeshInfo &loadedInfo, bool isBinary=false, const LoadSettings &settings=LoadSettings(), LogType &log=nullLogger)
Loads from the given input stl stream and puts the content into the mesh m.
Definition load.h:310
The LoadSettings structure contains the settings that can be used to load a mesh from a stream/file.
Definition settings.h:35