MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRegionBoundary.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRId.h"
5#include "MREnums.h"
6#include "MRPch/MRBindingMacros.h"
7
8namespace MR
9{
12
13
16[[nodiscard]] MRMESH_API EdgeLoop trackLeftBoundaryLoop( const MeshTopology & topology, EdgeId e0, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
18[[nodiscard]] MR_BIND_IGNORE inline EdgeLoop trackLeftBoundaryLoop( const MeshTopology & topology, const FaceBitSet & region, EdgeId e0, Turn turn = Turn::Rightmost )
19 { return trackLeftBoundaryLoop( topology, e0, &region, turn ); }
20
21MR_BIND_IGNORE MRMESH_API void trackLeftBoundaryLoop( const MeshTopology & topology, EdgeId e0, EdgeLoop & outLoop, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
22
25[[nodiscard]] MRMESH_API EdgeLoop trackRightBoundaryLoop( const MeshTopology & topology, EdgeId e0, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
27[[nodiscard]] MR_BIND_IGNORE inline EdgeLoop trackRightBoundaryLoop( const MeshTopology & topology, const FaceBitSet & region, EdgeId e0, Turn turn = Turn::Rightmost )
28 { return trackRightBoundaryLoop( topology, e0, &region, turn ); }
29
30MR_BIND_IGNORE MRMESH_API void trackRightBoundaryLoop( const MeshTopology & topology, EdgeId e0, EdgeLoop & outLoop, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
31
37MRMESH_API EdgeId extractPath( const MeshTopology& topology, EdgeId e0, EdgeBitSet& edges, EdgePath* outPath, Turn turn );
38
43MRMESH_API EdgeId extractOppositePath( const MeshTopology& topology, EdgeId e0, EdgeBitSet& edges, EdgePath* outPath, Turn turn );
44
49[[nodiscard]] MRMESH_API std::vector<EdgeLoop> extractAllLoops( const MeshTopology& topology, EdgeBitSet & edges, Turn turn );
50
55[[nodiscard]] MRMESH_API std::vector<EdgePath> extractAllPaths( const MeshTopology& topology, EdgeBitSet & edges, Turn turn );
56
59[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findLeftBoundary( const MeshTopology & topology, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
61[[nodiscard]] MR_BIND_IGNORE inline std::vector<EdgeLoop> findLeftBoundary( const MeshTopology & topology, const FaceBitSet & region, Turn turn = Turn::Rightmost )
62 { return findLeftBoundary( topology, &region, turn ); }
63
66[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findRightBoundary( const MeshTopology & topology, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
68[[nodiscard]] MR_BIND_IGNORE inline std::vector<EdgeLoop> findRightBoundary( const MeshTopology & topology, const FaceBitSet & region, Turn turn = Turn::Rightmost )
69 { return findRightBoundary( topology, &region, turn ); }
70
73[[nodiscard]] MRMESH_API EdgeBitSet findAllLeftBdEdges( const MeshTopology& topology, const FaceBitSet* region, bool innerMeshEdgesOnly = false );
74
79MRMESH_API std::vector<EdgeLoop> delRegionKeepBd( Mesh& mesh, const FaceBitSet* region = nullptr, bool keepLoneHoles = false );
81MR_BIND_IGNORE inline std::vector<EdgeLoop> delRegionKeepBd( Mesh & mesh, const FaceBitSet & region, bool keepLoneHoles = false )
82 { return delRegionKeepBd( mesh, &region, keepLoneHoles ); }
83
86[[nodiscard]] MRMESH_API std::vector<EdgePath> findLeftBoundaryInsideMesh( const MeshTopology & topology, const FaceBitSet & region );
87
89[[nodiscard]] MRMESH_API UndirectedEdgeBitSet findRegionBoundaryUndirectedEdgesInsideMesh( const MeshTopology & topology, const FaceBitSet & region );
90
92[[nodiscard]] MRMESH_API FaceBitSet findRegionOuterFaces( const MeshTopology& topology, const FaceBitSet& region );
93
95MR_BIND_OVERLOAD_SUFFIX() [[nodiscard]] MRMESH_API VertBitSet getIncidentVerts( const MeshTopology & topology, const FaceBitSet & faces );
96
99MR_BIND_OVERLOAD_SUFFIX(facesStore) [[nodiscard]] MRMESH_API const VertBitSet & getIncidentVerts( const MeshTopology & topology, const FaceBitSet * faces, VertBitSet & store );
100
102[[nodiscard]] MRMESH_API VertBitSet getInnerVerts( const MeshTopology & topology, const FaceBitSet * region = nullptr );
103
106[[nodiscard]] MRMESH_API MR_BIND_IGNORE VertBitSet getInnerVerts( const MeshTopology & topology, const FaceBitSet & region );
107
109[[nodiscard]] MRMESH_API VertBitSet getBoundaryVerts( const MeshTopology & topology, const FaceBitSet * region = nullptr );
110
113[[nodiscard]] MRMESH_API VertBitSet getRegionBoundaryVerts( const MeshTopology & topology, const FaceBitSet & region );
114
118[[nodiscard]] MRMESH_API VertBitSet getRegionInnerVerts( const MeshTopology & topology, const FaceBitSet & region );
119
121[[nodiscard]] MRMESH_API FaceBitSet getIncidentFaces( const MeshTopology & topology, const VertBitSet & verts );
122
124[[nodiscard]] MRMESH_API FaceBitSet getInnerFaces( const MeshTopology & topology, const VertBitSet & verts );
125
127[[nodiscard]] MRMESH_API EdgeBitSet getRegionEdges( const MeshTopology& topology, const FaceBitSet& faces );
128
130[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getIncidentEdges( const MeshTopology& topology, const FaceBitSet& faces );
131
133[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getIncidentEdges( const MeshTopology& topology, const UndirectedEdgeBitSet& edges );
134
136MR_BIND_OVERLOAD_SUFFIX(edges) [[nodiscard]] MRMESH_API VertBitSet getIncidentVerts( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
137
139[[nodiscard]] MRMESH_API FaceBitSet getIncidentFaces( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
140
142[[nodiscard]] MRMESH_API FaceBitSet getNeighborFaces( const MeshTopology& topology, const UndirectedEdgeBitSet& edges );
143
145[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getInnerEdges( const MeshTopology & topology, const VertBitSet& verts );
146
148[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getInnerEdges( const MeshTopology & topology, const FaceBitSet& region );
149
152MR_BIND_OVERLOAD_SUFFIX(edgesStore) [[nodiscard]] MRMESH_API const VertBitSet & getIncidentVerts( const MeshTopology & topology, const UndirectedEdgeBitSet * edges, VertBitSet & store );
153
155[[nodiscard]] MRMESH_API VertBitSet getInnerVerts( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
156
157}
#define MRMESH_API
Definition MRMeshFwd.h:85
Definition MRMeshTopology.h:31
std::vector< EdgeId > EdgeLoop
Definition MRMeshFwd.h:156
Turn
what way a path can follow in case of several alternatives
Definition MREnums.h:125
std::vector< EdgeLoop > delRegionKeepBd(Mesh &mesh, const FaceBitSet *region=nullptr, bool keepLoneHoles=false)
UndirectedEdgeBitSet getInnerEdges(const MeshTopology &topology, const VertBitSet &verts)
composes the set of all edges with all their vertices in given set
VertBitSet getIncidentVerts(const MeshTopology &topology, const FaceBitSet &faces)
composes the set of all vertices incident to given faces
std::vector< EdgePath > findLeftBoundaryInsideMesh(const MeshTopology &topology, const FaceBitSet &region)
std::vector< EdgeLoop > extractAllLoops(const MeshTopology &topology, EdgeBitSet &edges, Turn turn)
std::vector< EdgeLoop > findLeftBoundary(const MeshTopology &topology, const FaceBitSet *region=nullptr, Turn turn=Turn::Rightmost)
std::vector< EdgeLoop > findRightBoundary(const MeshTopology &topology, const FaceBitSet *region=nullptr, Turn turn=Turn::Rightmost)
UndirectedEdgeBitSet getIncidentEdges(const MeshTopology &topology, const FaceBitSet &faces)
composes the set of all undirected edges, having a face from given set from one of two sides
EdgeLoop trackRightBoundaryLoop(const MeshTopology &topology, EdgeId e0, const FaceBitSet *region=nullptr, Turn turn=Turn::Rightmost)
EdgeBitSet getRegionEdges(const MeshTopology &topology, const FaceBitSet &faces)
composes the set of all edges, having a face from given set at the left
VertBitSet getInnerVerts(const MeshTopology &topology, const FaceBitSet *region=nullptr)
composes the set of all vertices not on the boundary of a hole and with all their adjacent faces in g...
std::vector< EdgeId > EdgePath
Definition MRMeshFwd.h:155
EdgeId extractOppositePath(const MeshTopology &topology, EdgeId e0, EdgeBitSet &edges, EdgePath *outPath, Turn turn)
std::vector< EdgePath > extractAllPaths(const MeshTopology &topology, EdgeBitSet &edges, Turn turn)
FaceBitSet getInnerFaces(const MeshTopology &topology, const VertBitSet &verts)
composes the set of all faces with all their vertices in given set
FaceBitSet getNeighborFaces(const MeshTopology &topology, const UndirectedEdgeBitSet &edges)
composes the set of all left and right faces of given edges
EdgeId extractPath(const MeshTopology &topology, EdgeId e0, EdgeBitSet &edges, EdgePath *outPath, Turn turn)
VertBitSet getRegionInnerVerts(const MeshTopology &topology, const FaceBitSet &region)
FaceBitSet findRegionOuterFaces(const MeshTopology &topology, const FaceBitSet &region)
UndirectedEdgeBitSet findRegionBoundaryUndirectedEdgesInsideMesh(const MeshTopology &topology, const FaceBitSet &region)
returns all region boundary edges, where each edge has a region face on one side, and a valid not-reg...
FaceBitSet getIncidentFaces(const MeshTopology &topology, const VertBitSet &verts)
composes the set of all faces incident to given vertices
VertBitSet getRegionBoundaryVerts(const MeshTopology &topology, const FaceBitSet &region)
EdgeBitSet findAllLeftBdEdges(const MeshTopology &topology, const FaceBitSet *region, bool innerMeshEdgesOnly=false)
VertBitSet getBoundaryVerts(const MeshTopology &topology, const FaceBitSet *region=nullptr)
composes the set of all boundary vertices for given region (or whole mesh if !region)
EdgeLoop trackLeftBoundaryLoop(const MeshTopology &topology, EdgeId e0, const FaceBitSet *region=nullptr, Turn turn=Turn::Rightmost)
@ Rightmost
Definition MREnums.h:127
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:24