MeshLib Documentation
Loading...
Searching...
No Matches
MRContoursSeparation.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include <functional>
5
6namespace MR
7{
8
9// Callback for each MeshEdgePoint in path
10using PathMeshEdgePointCallback = std::function<void( const MeshEdgePoint& mep )>;
11
12// Separates mesh into disconnected by contour components (independent components are not returned),
13// faces that are intersected by contour does not belong to any component.
14// Calls callback for each MeshEdgePoint in contour respecting order,
15// ignoring MeshTriPoints (if projection of input point lay inside face)
16MRMESH_API std::vector<FaceBitSet> separateClosedContour( const Mesh& mesh, const std::vector<Vector3f>& contour,
17 const PathMeshEdgePointCallback& cb = {} );
18
19} //namespace MR
20
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRCameraOrientationPlugin.h:8
MRMESH_API std::vector< FaceBitSet > separateClosedContour(const Mesh &mesh, const std::vector< Vector3f > &contour, const PathMeshEdgePointCallback &cb={})
std::function< void(const MeshEdgePoint &mep)> PathMeshEdgePointCallback
Definition MRContoursSeparation.h:10
encodes a point on an edge of mesh or of polyline
Definition MREdgePoint.h:11
Definition MRMesh/MRMesh.h:23