MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDistanceMapSave.h
Go to the documentation of this file.
1#pragma once
2#include "MRPch/MRBindingMacros.h"
3#include "MRMeshFwd.h"
4#include "MRIOFilters.h"
6#include "MRExpected.h"
7#include <filesystem>
8
9namespace MR
10{
11
12namespace DistanceMapSave
13{
14
18
25MRMESH_API Expected<void> toRAW( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
26[[deprecated( "Use toRAW( dmap, path, settings )")]]
27MR_BIND_IGNORE inline Expected<void> toRAW( const std::filesystem::path& path, const DistanceMap& dmap )
28{
29 return toRAW( dmap, path );
30}
31
32MRMESH_API Expected<void> toMrDistanceMap( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
33[[deprecated( "Use toMrDistanceMap( dmap, path, settings )")]]
34MR_BIND_IGNORE inline Expected<void> toMrDistanceMap( const std::filesystem::path& path, const DistanceMap& dmapObject, const DistanceMapToWorld& params )
35{
36 const auto xf = params.xf();
37 return toMrDistanceMap( dmapObject, path, {
38 .xf = &xf,
39 } );
40}
41
42MRMESH_API Expected<void> toAnySupportedFormat( const DistanceMap& dmap, const std::filesystem::path& path, const DistanceMapSaveSettings& settings = {} );
43[[deprecated( "Use toAnySupportedFormat( dmap, path, settings )")]]
44MR_BIND_IGNORE inline Expected<void> toAnySupportedFormat( const std::filesystem::path& path, const DistanceMap& dmapObject, const AffineXf3f * xf = nullptr )
45{
46 return toAnySupportedFormat( dmapObject, path, {
47 .xf = xf,
48 } );
49}
50
52
53} // namespace DistanceMapSave
54
55} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
Definition MRDistanceMap.h:24
MRMESH_API Expected< void > toAnySupportedFormat(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
MRMESH_API Expected< void > toMrDistanceMap(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
MRMESH_API Expected< void > toRAW(const DistanceMap &dmap, const std::filesystem::path &path, const DistanceMapSaveSettings &settings={})
Save DistanceMap to binary file Format: 2 integer - DistanceMap.resX & DistanceMap....
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:25
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:10
determines how to save distance maps
Definition MRDistanceMapParams.h:198
This structure store data to transform distance map to world coordinates.
Definition MRDistanceMapParams.h:136
AffineXf3f xf() const
Definition MRDistanceMapParams.h:170