MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRegularMapMesher.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRPointCloud.h"
5#include "MRExpected.h"
6#include <filesystem>
7
8namespace MR
9{
12
13
23{
24public:
26 MRMESH_API void setSurfacePC( const std::shared_ptr<PointCloud>& surfacePC );
28 MRMESH_API void setDirectionsPC( const std::shared_ptr<PointCloud>& directionsPC );
30 MRMESH_API Expected<void> loadDistances( int width, int height, const std::filesystem::path& path );
32 MRMESH_API void setDistances( int width, int height, const std::vector<float>& distances );
33
35 MRMESH_API Expected<Mesh> createMesh() const;
36
37private:
38 int width_{0};
39 int height_{0};
40
41 std::shared_ptr<PointCloud> surfacePC_;
42 std::shared_ptr<PointCloud> directionsPC_;
43 std::vector<float> distances_;
44};
45}
Class for making mesh from regular distance map.
Definition MRRegularMapMesher.h:23
auto width(const Box< V > &box)
returns size along x axis
Definition MRBox.h:354
auto height(const Box< V > &box)
returns size along y axis
Definition MRBox.h:361
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.
tl::expected< T, E > Expected
Definition MRExpected.h:31
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.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8