MeshLib Documentation
Loading...
Searching...
No Matches
MRMesh/MRPointsSave.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRExpected.h"
5#include "MRPointCloud.h"
6#include "MRIOFilters.h"
7#include "MRSaveSettings.h"
8#include <filesystem>
9#include <ostream>
10
11namespace MR
12{
13
14namespace PointsSave
15{
16
20
23MRMESH_API Expected<void> toXyz( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
24MRMESH_API Expected<void> toXyz( const PointCloud& points, std::ostream& out, const SaveSettings& settings = {} );
25
28MRMESH_API Expected<void> toXyzn( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
29MRMESH_API Expected<void> toXyzn( const PointCloud& points, std::ostream& out, const SaveSettings& settings = {} );
30
32MRMESH_API Expected<void> toAsc( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
33MRMESH_API Expected<void> toAsc( const PointCloud& points, std::ostream& out, const SaveSettings& settings = {} );
34
36MRMESH_API Expected<void> toPly( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
37MRMESH_API Expected<void> toPly( const PointCloud& points, std::ostream& out, const SaveSettings& settings = {} );
38
40MRMESH_API Expected<void> toAnySupportedFormat( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
42MRMESH_API Expected<void> toAnySupportedFormat( const PointCloud& points, const std::string& extension, std::ostream& out, const SaveSettings& settings = {} );
43
45
46} // namespace PointsSave
47
48} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
MRMESH_API Expected< void > toAnySupportedFormat(const PointCloud &points, const std::filesystem::path &file, const SaveSettings &settings={})
detects the format from file extension and save points to it
MRMESH_API Expected< void > toXyz(const PointCloud &points, const std::filesystem::path &file, const SaveSettings &settings={})
MRMESH_API Expected< void > toAsc(const PointCloud &points, const std::filesystem::path &file, const SaveSettings &settings={})
save points with normals in .xyzn format, and save points without normals in .xyz format
MRMESH_API Expected< void > toXyzn(const PointCloud &points, const std::filesystem::path &file, const SaveSettings &settings={})
MRMESH_API Expected< void > toPly(const PointCloud &points, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .ply file
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRMesh/MRPointCloud.h:16
determines how to save points/lines/mesh
Definition MRSaveSettings.h:14