A set of functions for selecting segments on a mesh. More...
Functions | |
MRMESH_API FaceBitSet | MR::fillContourLeftByGraphCut (const MeshTopology &topology, const EdgePath &contour, const EdgeMetric &metric) |
Fills region located to the left from given contour, by minimizing the sum of metric over the boundary. | |
MRMESH_API FaceBitSet | MR::fillContourLeftByGraphCut (const MeshTopology &topology, const std::vector< EdgePath > &contours, const EdgeMetric &metric) |
Fills region located to the left from given contours, by minimizing the sum of metric over the boundary. | |
MRMESH_API FaceBitSet | MR::segmentByGraphCut (const MeshTopology &topology, const FaceBitSet &source, const FaceBitSet &sink, const EdgeMetric &metric) |
Finds segment that divide mesh on source and sink (source included, sink excluded), by minimizing the sum of metric over the boundary. | |
MRMESH_API Expected< EdgeLoop > | MR::surroundingContour (const Mesh &mesh, std::vector< EdgeId > includeEdges, const EdgeMetric &edgeMetric, const Vector3f &dir) |
Find the best closed edge loop passing through given edges, which minimizes the sum of given edge metric. | |
A set of functions for selecting segments on a mesh.
MRMESH_API FaceBitSet MR::fillContourLeftByGraphCut | ( | const MeshTopology & | topology, |
const EdgePath & | contour, | ||
const EdgeMetric & | metric ) |
Fills region located to the left from given contour, by minimizing the sum of metric over the boundary.
MRMESH_API FaceBitSet MR::fillContourLeftByGraphCut | ( | const MeshTopology & | topology, |
const std::vector< EdgePath > & | contours, | ||
const EdgeMetric & | metric ) |
Fills region located to the left from given contours, by minimizing the sum of metric over the boundary.
MRMESH_API FaceBitSet MR::segmentByGraphCut | ( | const MeshTopology & | topology, |
const FaceBitSet & | source, | ||
const FaceBitSet & | sink, | ||
const EdgeMetric & | metric ) |
Finds segment that divide mesh on source and sink (source included, sink excluded), by minimizing the sum of metric over the boundary.
|
nodiscard |
Find the best closed edge loop passing through given edges, which minimizes the sum of given edge metric.
Find the best closed edge loop passing through given vertices, which minimizes the sum of given edge metric.
includeEdges | contain all edges that must be present in the returned loop, probably with reversed direction (should have at least 2 elements) |
edgeMetric | returned loop will minimize the sum of this metric |
dir | direction approximately orthogonal to the loop |
keyVertices | contain all vertices that returned loop must pass (should have at least 2 elements) |
edgeMetric | returned loop will minimize the sum of this metric |
dir | direction approximately orthogonal to the loop |