Topics | |
Planar Path | |
Surface Distance | |
Group Surface Distance Builder | |
Surface Path | |
Tunnel Detector | |
Classes | |
struct | MR::VertPathInfo |
information associated with each vertex by the paths builder More... | |
MRMESH_API EdgeMetric | MR::identityMetric () |
metric returning 1 for every edge | |
MRMESH_API EdgeMetric | MR::edgeLengthMetric (const Mesh &mesh) |
MRMESH_API EdgeMetric | MR::discreteAbsMeanCurvatureMetric (const Mesh &mesh) |
MRMESH_API EdgeMetric | MR::discreteMinusAbsMeanCurvatureMetric (const Mesh &mesh) |
MRMESH_API EdgeMetric | MR::edgeCurvMetric (const Mesh &mesh, float angleSinFactor=2, float angleSinForBoundary=0) |
MRMESH_API EdgeMetric | MR::edgeTableSymMetric (const MeshTopology &topology, const EdgeMetric &metric) |
EdgeMetric | MR::edgeTableMetric (const MeshTopology &topology, const EdgeMetric &metric) |
MRMESH_API bool | MR::isEdgePath (const MeshTopology &topology, const std::vector< EdgeId > &edges) |
returns true if every next edge starts where previous edge ends | |
MRMESH_API bool | MR::isEdgeLoop (const MeshTopology &topology, const std::vector< EdgeId > &edges) |
returns true if every next edge starts where previous edge ends, and start vertex coincides with finish vertex | |
MRMESH_API std::vector< EdgeLoop > | MR::splitOnSimpleLoops (const MeshTopology &topology, std::vector< EdgeLoop > &&loops) |
given a number of edge loops, splits every loop that passes via a vertex more than once on smaller loops without self-intersections | |
MRMESH_API void | MR::reverse (EdgePath &path) |
MRMESH_API void | MR::reverse (std::vector< EdgePath > &paths) |
reverse every path in the vector | |
MRMESH_API double | MR::calcPathMetric (const EdgePath &path, EdgeMetric metric) |
computes summed metric of all edges in the path | |
double | MR::calcPathLength (const EdgePath &path, const Mesh &mesh) |
MRMESH_API Vector3d | MR::calcOrientedArea (const EdgeLoop &loop, const Mesh &mesh) |
MRMESH_API void | MR::sortPathsByMetric (std::vector< EdgePath > &paths, EdgeMetric metric) |
sorts given paths in ascending order of their metrics | |
void | MR::sortPathsByLength (std::vector< EdgePath > &paths, const Mesh &mesh) |
MRMESH_API void | MR::addLeftBand (const MeshTopology &topology, const EdgeLoop &loop, FaceBitSet &addHere) |
adds all faces incident to loop vertices and located to the left from the loop to given FaceBitSet | |
MRMESH_API EdgePath | MR::buildShortestPath (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX) |
MRMESH_API EdgePath | MR::buildShortestPathBiDir (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX) |
MRMESH_API EdgePath | MR::buildShortestPathBiDir (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX) |
MRMESH_API EdgePath | MR::buildShortestPathAStar (const Mesh &mesh, VertId start, VertId finish, float maxPathLen=FLT_MAX) |
MRMESH_API EdgePath | MR::buildShortestPathAStar (const Mesh &mesh, const MeshTriPoint &start, const MeshTriPoint &finish, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathLen=FLT_MAX) |
MRMESH_API EdgePath | MR::buildShortestPath (const Mesh &mesh, VertId start, const VertBitSet &finish, float maxPathLen=FLT_MAX) |
builds shortest path in euclidean metric from start to finish vertices; if no path can be found then empty path is returned | |
MRMESH_API EdgePath | MR::buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX) |
builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned | |
MRMESH_API EdgePath | MR::buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, VertId start, VertId finish, float maxPathMetric=FLT_MAX) |
MRMESH_API EdgePath | MR::buildSmallestMetricPathBiDir (const MeshTopology &topology, const EdgeMetric &metric, const TerminalVertex *starts, int numStarts, const TerminalVertex *finishes, int numFinishes, VertId *outPathStart=nullptr, VertId *outPathFinish=nullptr, float maxPathMetric=FLT_MAX) |
MRMESH_API EdgePath | MR::buildSmallestMetricPath (const MeshTopology &topology, const EdgeMetric &metric, VertId start, const VertBitSet &finish, float maxPathMetric=FLT_MAX) |
builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned | |
MRMESH_API std::vector< VertId > | MR::getVertexOrdering (const MeshTopology &topology, VertBitSet region) |
returns all vertices from given region ordered in each connected component in breadth-first way | |
MRMESH_API std::vector< EdgeLoop > | MR::extractClosedLoops (const MeshTopology &topology, EdgeBitSet &edges) |
finds all closed loops from given edges and removes them from edges | |
MRMESH_API std::vector< EdgeLoop > | MR::extractClosedLoops (const MeshTopology &topology, const std::vector< EdgeId > &inEdges, EdgeBitSet *outNotLoopEdges=nullptr) |
MRMESH_API EdgeLoop | MR::extractLongestClosedLoop (const Mesh &mesh, const std::vector< EdgeId > &inEdges) |
MRMESH_API bool | MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet ®ion, float dilation, ProgressCallback callback={}) |
expands the region (of faces or vertices) on given metric value. returns false if callback also returns false | |
MRMESH_API bool | MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::dilateRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, FaceBitSet ®ion, float dilation, ProgressCallback callback={}) |
shrinks the region (of faces or vertices) on given metric value. returns false if callback also returns false | |
MRMESH_API bool | MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, VertBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::erodeRegionByMetric (const MeshTopology &topology, const EdgeMetric &metric, UndirectedEdgeBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::dilateRegion (const Mesh &mesh, FaceBitSet ®ion, float dilation, ProgressCallback callback={}) |
expands the region (of faces or vertices) on given value (in meters). returns false if callback also returns false | |
MRMESH_API bool | MR::dilateRegion (const Mesh &mesh, VertBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::dilateRegion (const Mesh &mesh, UndirectedEdgeBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::erodeRegion (const Mesh &mesh, FaceBitSet ®ion, float dilation, ProgressCallback callback={}) |
shrinks the region (of faces or vertices) on given value (in meters). returns false if callback also returns false | |
MRMESH_API bool | MR::erodeRegion (const Mesh &mesh, VertBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API bool | MR::erodeRegion (const Mesh &mesh, UndirectedEdgeBitSet ®ion, float dilation, ProgressCallback callback={}) |
MRMESH_API int | MR::getPathPlaneIntersections (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, std::vector< MeshEdgePoint > *outIntersections=nullptr) |
finds all intersection points between given path and plane, adds them in outIntersections and returns their number | |
MRMESH_API int | MR::getPathEdgesInPlane (const Mesh &mesh, const EdgePath &path, const Plane3f &plane, float tolerance=0.0f, std::vector< EdgeId > *outInPlaneEdges=nullptr) |
finds all path edges located in given plane with given tolerance, adds them in outInPlaneEdges and returns their number | |
MRMESH_API void MR::addLeftBand | ( | const MeshTopology & | topology, |
const EdgeLoop & | loop, | ||
FaceBitSet & | addHere ) |
adds all faces incident to loop vertices and located to the left from the loop to given FaceBitSet
|
nodiscard |
builds shortest path in euclidean metric from start to finish vertices; if no path can be found then empty path is returned
|
nodiscard |
finds the shortest path in euclidean metric from start to finish vertices using Dijkstra algorithm; if no path can be found then empty path is returned
|
nodiscard |
finds the path from a vertex in start-triangle to a vertex in finish-triangle, so that the length start-first_vertex-...-last_vertex-finish is shortest in euclidean metric; using A* modification of Dijkstra algorithm, which is faster for near linear path; if no path can be found then empty path is returned
|
nodiscard |
finds the shortest path in euclidean metric from start to finish vertices using A* modification of Dijkstra algorithm, which is faster for near linear path; if no path can be found then empty path is returned
|
nodiscard |
finds the path from a vertex in start-triangle to a vertex in finish-triangle, so that the length start-first_vertex-...-last_vertex-finish is shortest in euclidean metric; using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned
|
nodiscard |
finds the shortest path in euclidean metric from start to finish vertices using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned
|
nodiscard |
builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
|
nodiscard |
builds shortest path in given metric from start to finish vertices; if no path can be found then empty path is returned
|
nodiscard |
finds the smallest metric path from one of start vertices to one of the finish vertices, using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both starts and finishes, which is faster for long paths; if no path can be found then empty path is returned
|
nodiscard |
finds the smallest metric path from start vertex to finish vertex, using bidirectional modification of Dijkstra algorithm, constructing the path simultaneously from both start and finish, which is faster for long paths; if no path can be found then empty path is returned
|
nodiscard |
returns the vector with the magnitude equal to the area surrounded by the loop (if the loop is planar), and directed to see the loop in ccw order from the vector tip
|
nodiscard |
computes summed metric of all edges in the path
MRMESH_API bool MR::dilateRegion | ( | const Mesh & | mesh, |
FaceBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
expands the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
MRMESH_API bool MR::dilateRegion | ( | const Mesh & | mesh, |
UndirectedEdgeBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::dilateRegion | ( | const Mesh & | mesh, |
VertBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::dilateRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
FaceBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
expands the region (of faces or vertices) on given metric value. returns false if callback also returns false
MRMESH_API bool MR::dilateRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
UndirectedEdgeBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::dilateRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
VertBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
|
nodiscard |
returns edge's absolute discrete mean curvature as a metric; the metric is minimal in the planar regions of mesh; this metric is symmetric: m(e) == m(e.sym())
|
nodiscard |
returns minus of edge's absolute discrete mean curvature as a metric; the metric is minimal in the most curved regions of mesh; this metric is symmetric: m(e) == m(e.sym())
|
nodiscard |
returns edge's metric that depends both on edge's length and on the angle between its left and right faces
angleSinFactor | multiplier before dihedral angle sine in edge metric calculation (positive to prefer concave angles, negative - convex) |
angleSinForBoundary | consider this dihedral angle sine for boundary edges; this metric is symmetric: m(e) == m(e.sym()) |
|
nodiscard |
returns edge's length as a metric; this metric is symmetric: m(e) == m(e.sym())
|
inline |
|
nodiscard |
pre-computes the metric for all mesh edges to quickly return it later for any edge; input metric must be symmetric: metric(e) == metric(e.sym())
MRMESH_API bool MR::erodeRegion | ( | const Mesh & | mesh, |
FaceBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
shrinks the region (of faces or vertices) on given value (in meters). returns false if callback also returns false
MRMESH_API bool MR::erodeRegion | ( | const Mesh & | mesh, |
UndirectedEdgeBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::erodeRegion | ( | const Mesh & | mesh, |
VertBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::erodeRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
FaceBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
shrinks the region (of faces or vertices) on given metric value. returns false if callback also returns false
MRMESH_API bool MR::erodeRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
UndirectedEdgeBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
MRMESH_API bool MR::erodeRegionByMetric | ( | const MeshTopology & | topology, |
const EdgeMetric & | metric, | ||
VertBitSet & | region, | ||
float | dilation, | ||
ProgressCallback | callback = {} ) |
|
nodiscard |
|
nodiscard |
finds all closed loops from given edges and removes them from edges
|
nodiscard |
MRMESH_API int MR::getPathEdgesInPlane | ( | const Mesh & | mesh, |
const EdgePath & | path, | ||
const Plane3f & | plane, | ||
float | tolerance = 0.0f, | ||
std::vector< EdgeId > * | outInPlaneEdges = nullptr ) |
finds all path edges located in given plane with given tolerance, adds them in outInPlaneEdges and returns their number
MRMESH_API int MR::getPathPlaneIntersections | ( | const Mesh & | mesh, |
const EdgePath & | path, | ||
const Plane3f & | plane, | ||
std::vector< MeshEdgePoint > * | outIntersections = nullptr ) |
finds all intersection points between given path and plane, adds them in outIntersections and returns their number
|
nodiscard |
returns all vertices from given region ordered in each connected component in breadth-first way
|
nodiscard |
metric returning 1 for every edge
|
nodiscard |
returns true if every next edge starts where previous edge ends, and start vertex coincides with finish vertex
|
nodiscard |
returns true if every next edge starts where previous edge ends
MRMESH_API void MR::reverse | ( | EdgePath & | path | ) |
reverses the order of edges and flips each edge orientation, thus making the opposite directed edge path
MRMESH_API void MR::reverse | ( | std::vector< EdgePath > & | paths | ) |
reverse every path in the vector
MRMESH_API void MR::sortPathsByMetric | ( | std::vector< EdgePath > & | paths, |
EdgeMetric | metric ) |
sorts given paths in ascending order of their metrics
|
nodiscard |
given a number of edge loops, splits every loop that passes via a vertex more than once on smaller loops without self-intersections