35 if ( i <
mids.size() )
37 assert(
end.valid() );
38 assert( i ==
mids.size() );
55 default:
return "Unknown error. Please, report to developers for further investigations";
67 int maxGeodesicIters = 5,
68 const VertBitSet* vertRegion =
nullptr, VertScalars * outSurfaceDistances =
nullptr );
74 int maxGeodesicIters = 100 );
95 VertScalars * outSurfaceDistances =
nullptr );
141 const VertBitSet & starts,
const VertBitSet & ends,
const VertBitSet * vertRegion =
nullptr,
142 VertScalars * outSurfaceDistances =
nullptr );
#define MRMESH_API
Definition MRMeshFwd.h:85
Definition MRMeshTopology.h:31
GeodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MREnums.h:114
std::vector< SurfacePath > SurfacePaths
Definition MRMeshFwd.h:491
Contour3< float > Contour3f
Definition MRMeshFwd.h:378
EdgePoint
Definition MRMeshFwd.h:477
MeshTriPoint
Definition MRMeshFwd.h:515
Contours3< float > Contours3f
Definition MRMeshFwd.h:388
tl::expected< T, E > Expected
Definition MRExpected.h:31
std::vector< MeshEdgePoint > SurfacePath
Definition MRMeshFwd.h:490
EdgePoint MeshEdgePoint
Definition MRMeshFwd.h:486
phmap::flat_hash_map< K, V, Hash, Eq, Allocator< std::pair< const K, V > > > HashMap
Definition MRMeshFwd.h:631
std::string_view toString(DimensionsVisualizePropertyType value)
@ FastMarching
use Fast Marching algorithm
Definition MREnums.h:120
float geodesicPathLength(const Mesh &mesh, const GeodesicPath &path)
computes the length of the given geodesic path
Expected< SurfacePath, PathError > computeFastMarchingPath(const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
Contour3f geodesicPathToContour3f(const Mesh &mesh, const GeodesicPath &path)
returns coordinates of all vertices of the given path
bool isConnectedPath(const MeshTopology &topology, const MeshTriPoint &start, const SurfacePath &path, const MeshTriPoint &end)
float surfacePathLength(const Mesh &mesh, const SurfacePath &surfacePath)
computes the length of the given surface path
ExtremeEdgeType
Definition MRSurfacePath.h:130
HashMap< VertId, VertId > computeClosestSurfacePathTargets(const Mesh &mesh, const VertBitSet &starts, const VertBitSet &ends, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
SurfacePaths getSurfacePathsViaVertices(const Mesh &mesh, const VertBitSet &vs)
SurfacePath computeSteepestDescentPath(const MeshPart &mp, const VertScalars &field, const MeshTriPoint &start, const ComputeSteepestDescentPathSettings &settings={})
Expected< SurfacePath, PathError > computeGeodesicPathApprox(const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype)
Contours3f surfacePathsToContours3f(const Mesh &mesh, const SurfacePaths &lines)
Contour3f surfacePathToContour3f(const Mesh &mesh, const SurfacePath &line)
converts lines on mesh in 3D contours by computing coordinate of each point
MeshEdgePoint findSteepestDescentPoint(const MeshPart &mp, const VertScalars &field, VertId v)
finds the point along minus maximal gradient on the boundary of first ring boundary around given vert...
UndirectedEdgeBitSet findExtremeEdges(const Mesh &mesh, const VertScalars &field, ExtremeEdgeType type)
computes all edges in the mesh, where the field not-increases both in left and right triangles
Expected< SurfacePath, PathError > computeGeodesicPath(const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype=GeodesicPathApprox::FastMarching, int maxGeodesicIters=100)
the maximum number of iterations to reduce approximate path length and convert it in geodesic path
Expected< SurfacePath, PathError > computeShortestEdgePath(const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, const VertBitSet *vertRegion=nullptr)
Expected< SurfacePath, PathError > computeSurfacePath(const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, int maxGeodesicIters=5, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr)
PathError
Definition MRSurfacePath.h:44
@ Gorge
where the field not-increases both in left and right triangles
Definition MRSurfacePath.h:132
@ Ridge
Definition MRSurfacePath.h:131
@ InternalError
report to developers for investigation
Definition MRSurfacePath.h:46
@ StartEndNotConnected
no path can be found from start to end, because they are not from the same connected component
Definition MRSurfacePath.h:45
auto end(ViewportMask)
Definition MRViewportId.h:124
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRSurfacePath.h:98
EdgePoint * outBdReached
if not nullptr, then the descent is stopped as soon as any boundary point is reached,...
Definition MRSurfacePath.h:104
MeshTriPoint end
if valid, then the descent is stopped as soon as same triangle with (end) is reached
Definition MRSurfacePath.h:100
VertId * outVertexReached
if not nullptr, then the descent is stopped as soon as any vertex is reached, which is written in *ou...
Definition MRSurfacePath.h:102
Definition MRSurfacePath.h:20
MeshTriPoint start
can be invalid, then the path starts in mids.front()
Definition MRSurfacePath.h:21
size_t numVertices() const
Definition MRSurfacePath.h:25
MeshTriPoint end
can be invalid, then the path ends in mids.back()
Definition MRSurfacePath.h:23
MeshTriPoint operator[](size_t i) const
Definition MRSurfacePath.h:27
SurfacePath mids
Definition MRSurfacePath.h:22