Classes | |
struct | MR::ComputeSteepestDescentPathSettings |
Enumerations | |
enum class | MR::PathError { MR::PathError::StartEndNotConnected , MR::PathError::InternalError } |
enum class | MR::GeodesicPathApprox : char { MR::GeodesicPathApprox::DijkstraBiDir , MR::GeodesicPathApprox::DijkstraAStar , MR::GeodesicPathApprox::FastMarching } |
the algorithm to compute approximately geodesic path More... | |
enum class | MR::ExtremeEdgeType { MR::ExtremeEdgeType::Ridge , MR::ExtremeEdgeType::Gorge } |
Functions | |
std::string | MR::toString (PathError error) |
MRMESH_API Expected< SurfacePath, PathError > | MR::computeSurfacePath (const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, int maxGeodesicIters=5, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr) |
MRMESH_API Expected< SurfacePath, PathError > | MR::computeGeodesicPath (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype, int maxGeodesicIters=100) |
the maximum number of iterations to reduce approximate path length and convert it in geodesic path | |
MRMESH_API Expected< SurfacePath, PathError > | MR::computeGeodesicPathApprox (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &end, GeodesicPathApprox atype) |
MRMESH_API Expected< SurfacePath, PathError > | MR::computeFastMarchingPath (const MeshPart &mp, const MeshTriPoint &start, const MeshTriPoint &end, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr) |
MRMESH_API SurfacePath | MR::computeSteepestDescentPath (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &start, const ComputeSteepestDescentPathSettings &settings={}) |
MRMESH_API void | MR::computeSteepestDescentPath (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &start, SurfacePath *outPath, const ComputeSteepestDescentPathSettings &settings={}) |
MRMESH_API MeshEdgePoint | MR::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 vertex | |
MRMESH_API MeshEdgePoint | MR::findSteepestDescentPoint (const MeshPart &mp, const VertScalars &field, const MeshEdgePoint &ep) |
finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of left and right edge triangles' union in case (ep) is inner edge point) | |
MRMESH_API MeshEdgePoint | MR::findSteepestDescentPoint (const MeshPart &mp, const VertScalars &field, const MeshTriPoint &tp) |
finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of the triangle itself in case (tp) is inner triangle point) | |
MRMESH_API UndirectedEdgeBitSet | MR::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 | |
MRMESH_API HashMap< VertId, VertId > | MR::computeClosestSurfacePathTargets (const Mesh &mesh, const VertBitSet &starts, const VertBitSet &ends, const VertBitSet *vertRegion=nullptr, VertScalars *outSurfaceDistances=nullptr) |
MRMESH_API SurfacePaths | MR::getSurfacePathsViaVertices (const Mesh &mesh, const VertBitSet &vs) |
MRMESH_API float | MR::surfacePathLength (const Mesh &mesh, const SurfacePath &surfacePath) |
computes the length of surface path | |
MRMESH_API Contour3f | MR::surfacePathToContour3f (const Mesh &mesh, const SurfacePath &line) |
converts lines on mesh in 3D contours by computing coordinate of each point | |
MRMESH_API Contours3f | MR::surfacePathsToContours3f (const Mesh &mesh, const SurfacePaths &lines) |
|
strong |
|
strong |
|
strong |
MRMESH_API HashMap< VertId, VertId > MR::computeClosestSurfacePathTargets | ( | const Mesh & | mesh, |
const VertBitSet & | starts, | ||
const VertBitSet & | ends, | ||
const VertBitSet * | vertRegion = nullptr, | ||
VertScalars * | outSurfaceDistances = nullptr ) |
for each vertex from (starts) finds the closest vertex from (ends) in geodesic sense
vertRegion | consider paths going in this region only |
MRMESH_API Expected< SurfacePath, PathError > MR::computeFastMarchingPath | ( | const MeshPart & | mp, |
const MeshTriPoint & | start, | ||
const MeshTriPoint & | end, | ||
const VertBitSet * | vertRegion = nullptr, | ||
VertScalars * | outSurfaceDistances = nullptr ) |
computes by Fast Marching method and returns intermediate points of approximately geodesic path from start to end, where it crosses mesh edges; the path can be limited to given region: in face-format inside mp, or in vert-format in vertRegion argument
MRMESH_API Expected< SurfacePath, PathError > MR::computeGeodesicPath | ( | const Mesh & | mesh, |
const MeshTriPoint & | start, | ||
const MeshTriPoint & | end, | ||
GeodesicPathApprox | atype, | ||
int | maxGeodesicIters = 100 ) |
the maximum number of iterations to reduce approximate path length and convert it in geodesic path
returns intermediate points of the geodesic path from start to end, where it crosses mesh edges; It is the same as calling computeGeodesicPathApprox() then reducePath()
MRMESH_API Expected< SurfacePath, PathError > MR::computeGeodesicPathApprox | ( | const Mesh & | mesh, |
const MeshTriPoint & | start, | ||
const MeshTriPoint & | end, | ||
GeodesicPathApprox | atype ) |
computes by given method and returns intermediate points of approximately geodesic path from start to end, every next point is located in the same triangle with the previous point
|
nodiscard |
computes the path (edge points crossed by the path) staring in given point and moving in each triangle in minus gradient direction of given field; the path stops when it reaches a local minimum in the field or one of stop conditions in settings
MRMESH_API void MR::computeSteepestDescentPath | ( | const MeshPart & | mp, |
const VertScalars & | field, | ||
const MeshTriPoint & | start, | ||
SurfacePath * | outPath, | ||
const ComputeSteepestDescentPathSettings & | settings = {} ) |
computes the path (edge points crossed by the path) staring in given point and moving in each triangle in minus gradient direction of given field, and outputs the path in
outPath | if requested; the path stops when it reaches a local minimum in the field or one of stop conditions in settings |
MRMESH_API Expected< SurfacePath, PathError > MR::computeSurfacePath | ( | const MeshPart & | mp, |
const MeshTriPoint & | start, | ||
const MeshTriPoint & | end, | ||
int | maxGeodesicIters = 5, | ||
const VertBitSet * | vertRegion = nullptr, | ||
VertScalars * | outSurfaceDistances = nullptr ) |
returns intermediate points of the geodesic path from start to end, where it crosses mesh edges; the path can be limited to given region: in face-format inside mp, or in vert-format in vertRegion argument. It is the same as calling computeFastMarchingPath() then reducePath()
maxGeodesicIters | the maximum number of iterations to reduce approximate path length and convert it in geodesic path |
|
nodiscard |
computes all edges in the mesh, where the field not-increases both in left and right triangles
|
nodiscard |
finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of left and right edge triangles' union in case (ep) is inner edge point)
|
nodiscard |
finds the point along minus maximal gradient on the boundary of triangles around given point (the boundary of the triangle itself in case (tp) is inner triangle point)
|
nodiscard |
finds the point along minus maximal gradient on the boundary of first ring boundary around given vertex
MRMESH_API SurfacePaths MR::getSurfacePathsViaVertices | ( | const Mesh & | mesh, |
const VertBitSet & | vs ) |
returns a set of mesh lines passing via most of given vertices in auto-selected order; the lines try to avoid sharp turns in the vertices
MRMESH_API float MR::surfacePathLength | ( | const Mesh & | mesh, |
const SurfacePath & | surfacePath ) |
computes the length of surface path
MRMESH_API Contours3f MR::surfacePathsToContours3f | ( | const Mesh & | mesh, |
const SurfacePaths & | lines ) |
MRMESH_API Contour3f MR::surfacePathToContour3f | ( | const Mesh & | mesh, |
const SurfacePath & | line ) |
converts lines on mesh in 3D contours by computing coordinate of each point
|
inline |