MeshLib Documentation
Loading...
Searching...
No Matches
MRMesh/MRMeshLoad.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRIOFilters.h"
5#include "MRId.h"
7#include "MRExpected.h"
9#include <filesystem>
10#include <istream>
11#include <string>
12
13namespace MR
14{
15
16namespace MeshLoad
17{
18
22
24MRMESH_API Expected<Mesh> fromMrmesh( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
25MRMESH_API Expected<Mesh> fromMrmesh( std::istream& in, const MeshLoadSettings& settings = {} );
26
28MRMESH_API Expected<Mesh> fromOff( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
29MRMESH_API Expected<Mesh> fromOff( std::istream& in, const MeshLoadSettings& settings = {} );
30
32MRMESH_API Expected<Mesh> fromObj( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
35MRMESH_API Expected<Mesh> fromObj( std::istream& in, const MeshLoadSettings& settings = {} );
37MRMESH_API Expected<Mesh> fromAnyStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
38MRMESH_API Expected<Mesh> fromAnyStl( std::istream& in, const MeshLoadSettings& settings = {} );
39
41MRMESH_API Expected<Mesh> fromBinaryStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
42MRMESH_API Expected<Mesh> fromBinaryStl( std::istream& in, const MeshLoadSettings& settings = {} );
43
45MRMESH_API Expected<Mesh> fromASCIIStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
46MRMESH_API Expected<Mesh> fromASCIIStl( std::istream& in, const MeshLoadSettings& settings = {} );
47
49MRMESH_API Expected<Mesh> fromPly( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
50MRMESH_API Expected<Mesh> fromPly( std::istream& in, const MeshLoadSettings& settings = {} );
51
52MRMESH_API Expected<Mesh> fromDxf( const std::filesystem::path& path, const MeshLoadSettings& settings = {} );
53MRMESH_API Expected<Mesh> fromDxf( std::istream& in, const MeshLoadSettings& settings = {} );
54
56MRMESH_API Expected<Mesh> fromAnySupportedFormat( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
58MRMESH_API Expected<Mesh> fromAnySupportedFormat( std::istream& in, const std::string& extension, const MeshLoadSettings& settings = {} );
59
61
62} // namespace MeshLoad
63
64} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
MRMESH_API Expected< Mesh > fromMrmesh(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from internal file format
MRMESH_API Expected< Mesh > fromObj(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from .obj file
MRMESH_API Expected< Mesh > fromDxf(const std::filesystem::path &path, const MeshLoadSettings &settings={})
MRMESH_API Expected< Mesh > fromAnyStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from any .stl
MRMESH_API Expected< Mesh > fromPly(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from .ply file
MRMESH_API Expected< Mesh > fromBinaryStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from binary .stl
MRMESH_API Expected< Mesh > fromOff(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from .off file
MRMESH_API Expected< Mesh > fromAnySupportedFormat(const std::filesystem::path &file, const MeshLoadSettings &settings={})
detects the format from file extension and loads mesh from it
MRMESH_API Expected< Mesh > fromASCIIStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads from ASCII .stl
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
setting for mesh loading from external format, and locations of optional output data
Definition MRMeshLoadSettings.h:10