MeshLib C++ Docs
Loading...
Searching...
No Matches
MRTunnelDetector.h
Go to the documentation of this file.
1#pragma once
2
3#include "MREdgeMetric.h"
5#include "MRExpected.h"
6#include <cfloat>
7
8namespace MR
9{
10
14
18MRMESH_API Expected<std::vector<EdgeLoop>> detectBasisTunnels( const MeshPart& mp, EdgeMetric metric = {}, ProgressCallback progressCallback = {} );
19
26MRMESH_API Expected<EdgeLoop> findSmallestMetricCoLoop( const MeshTopology& topology, const EdgeLoop& loop, const EdgeMetric& metric,
27 const FaceBitSet* region = nullptr );
28
30MRMESH_API Expected<EdgeLoop> findShortestCoLoop( const MeshPart& mp, const EdgeLoop& loop );
31
37[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findSmallestMetricEquivalentLoops( const MeshTopology& topology, const EdgeLoop& loop, const EdgeMetric& metric,
38 const FaceBitSet* region = nullptr );
39
41[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findShortestEquivalentLoops( const MeshPart& mp, const EdgeLoop& loop );
42
44{
46 float maxTunnelLength = FLT_MAX;
47
50 int maxIters = 1;
51
56 EdgeMetric metric;
57
60 bool buildCoLoops = true;
61
65
67 ProgressCallback progress;
68};
69
72MRMESH_API Expected<FaceBitSet> detectTunnelFaces( const MeshPart& mp, const DetectTunnelSettings & settings = {} );
73
75
76}
Definition MRMeshTopology.h:22
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRMESH_API std::vector< EdgeLoop > findSmallestMetricEquivalentLoops(const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
MRMESH_API Expected< EdgeLoop > findSmallestMetricCoLoop(const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
MRMESH_API std::vector< EdgeLoop > findShortestEquivalentLoops(const MeshPart &mp, const EdgeLoop &loop)
same as findSmallestMetricEquivalentLoops with euclidean edge length metric
MRMESH_API Expected< std::vector< EdgeLoop > > detectBasisTunnels(const MeshPart &mp, EdgeMetric metric={}, ProgressCallback progressCallback={})
MRMESH_API Expected< EdgeLoop > findShortestCoLoop(const MeshPart &mp, const EdgeLoop &loop)
same as findMinimalCoLoop with euclidean edge length metric
MRMESH_API Expected< FaceBitSet > detectTunnelFaces(const MeshPart &mp, const DetectTunnelSettings &settings={})
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRTunnelDetector.h:44
bool buildCoLoops
Definition MRTunnelDetector.h:60
EdgeMetric metric
Definition MRTunnelDetector.h:56
int maxIters
Definition MRTunnelDetector.h:50
bool filterEquivalentCoLoops
Definition MRTunnelDetector.h:64
float maxTunnelLength
maximal euclidean length of tunnel loops to detect
Definition MRTunnelDetector.h:46
ProgressCallback progress
to report algorithm progress and cancel from outside
Definition MRTunnelDetector.h:67