MeshLib Documentation
Loading...
Searching...
No Matches
MRRegularMapMesher.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRMesh.h"
4#include "MRPointCloud.h"
5#include "MRExpected.h"
6#include <filesystem>
7
8namespace MR
9{
10
20{
21public:
23 MRMESH_API void setSurfacePC( const std::shared_ptr<PointCloud>& surfacePC );
25 MRMESH_API void setDirectionsPC( const std::shared_ptr<PointCloud>& directionsPC );
27 MRMESH_API Expected<void> loadDistances( int width, int height, const std::filesystem::path& path );
29 MRMESH_API void setDistances( int width, int height, const std::vector<float>& distances );
30
33
34private:
35 int width_{0};
36 int height_{0};
37
38 std::shared_ptr<PointCloud> surfacePC_;
39 std::shared_ptr<PointCloud> directionsPC_;
40 std::vector<float> distances_;
41};
42}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Class for making mesh from regular distance map.
Definition MRRegularMapMesher.h:20
MRMESH_API Expected< void > loadDistances(int width, int height, const std::filesystem::path &path)
Loads distances form distances file (1/distance)
MRMESH_API void setDistances(int width, int height, const std::vector< float > &distances)
Sets distances.
MRMESH_API void setDirectionsPC(const std::shared_ptr< PointCloud > &directionsPC)
Sets directions Point Cloud.
MRMESH_API void setSurfacePC(const std::shared_ptr< PointCloud > &surfacePC)
Sets surface Point Cloud.
MRMESH_API Expected< Mesh > createMesh() const
Creates mesh if all components were successfully loaded.
auto width(const Box< V > &box)
returns size along x axis
Definition MRMesh/MRBox.h:247
auto height(const Box< V > &box)
returns size along y axis
Definition MRMesh/MRBox.h:254
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58