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
23[[nodiscard]] MRMESH_API EdgeLoop trackRightBoundaryLoop( const MeshTopology & topology, EdgeId e0, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
25[[nodiscard]] MR_BIND_IGNORE inline EdgeLoop trackRightBoundaryLoop( const MeshTopology & topology, const FaceBitSet & region, EdgeId e0, Turn turn = Turn::Rightmost )
26 { return trackRightBoundaryLoop( topology, e0, &region, turn ); }
27
33MRMESH_API EdgeId extractPath( const MeshTopology& topology, EdgeId e0, EdgeBitSet& edges, EdgePath* outPath, Turn turn );
34
39MRMESH_API EdgeId extractOppositePath( const MeshTopology& topology, EdgeId e0, EdgeBitSet& edges, EdgePath* outPath, Turn turn );
40
45[[nodiscard]] MRMESH_API std::vector<EdgeLoop> extractAllLoops( const MeshTopology& topology, EdgeBitSet & edges, Turn turn );
46
51[[nodiscard]] MRMESH_API std::vector<EdgePath> extractAllPaths( const MeshTopology& topology, EdgeBitSet & edges, Turn turn );
52
55[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findLeftBoundary( const MeshTopology & topology, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
57[[nodiscard]] MR_BIND_IGNORE inline std::vector<EdgeLoop> findLeftBoundary( const MeshTopology & topology, const FaceBitSet & region, Turn turn = Turn::Rightmost )
58 { return findLeftBoundary( topology, &region, turn ); }
59
62[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findRightBoundary( const MeshTopology & topology, const FaceBitSet * region = nullptr, Turn turn = Turn::Rightmost );
64[[nodiscard]] MR_BIND_IGNORE inline std::vector<EdgeLoop> findRightBoundary( const MeshTopology & topology, const FaceBitSet & region, Turn turn = Turn::Rightmost )
65 { return findRightBoundary( topology, &region, turn ); }
66
69[[nodiscard]] MRMESH_API EdgeBitSet findAllLeftBdEdges( const MeshTopology& topology, const FaceBitSet* region, bool innerMeshEdgesOnly = false );
70
75MRMESH_API std::vector<EdgeLoop> delRegionKeepBd( Mesh& mesh, const FaceBitSet* region = nullptr, bool keepLoneHoles = false );
77MR_BIND_IGNORE inline std::vector<EdgeLoop> delRegionKeepBd( Mesh & mesh, const FaceBitSet & region, bool keepLoneHoles = false )
78 { return delRegionKeepBd( mesh, &region, keepLoneHoles ); }
79
82[[nodiscard]] MRMESH_API std::vector<EdgePath> findLeftBoundaryInsideMesh( const MeshTopology & topology, const FaceBitSet & region );
83
85[[nodiscard]] MRMESH_API UndirectedEdgeBitSet findRegionBoundaryUndirectedEdgesInsideMesh( const MeshTopology & topology, const FaceBitSet & region );
86
88[[nodiscard]] MRMESH_API FaceBitSet findRegionOuterFaces( const MeshTopology& topology, const FaceBitSet& region );
89
91[[nodiscard]] MRMESH_API VertBitSet getIncidentVerts( const MeshTopology & topology, const FaceBitSet & faces );
92
95[[nodiscard]] MRMESH_API const VertBitSet & getIncidentVerts( const MeshTopology & topology, const FaceBitSet * faces, VertBitSet & store );
96
98[[nodiscard]] MRMESH_API VertBitSet getInnerVerts( const MeshTopology & topology, const FaceBitSet * region = nullptr );
99
102[[nodiscard]] MRMESH_API MR_BIND_IGNORE VertBitSet getInnerVerts( const MeshTopology & topology, const FaceBitSet & region );
103
105[[nodiscard]] MRMESH_API VertBitSet getBoundaryVerts( const MeshTopology & topology, const FaceBitSet * region = nullptr );
106
109[[nodiscard]] MRMESH_API VertBitSet getRegionBoundaryVerts( const MeshTopology & topology, const FaceBitSet & region );
110
112[[nodiscard]] MRMESH_API FaceBitSet getIncidentFaces( const MeshTopology & topology, const VertBitSet & verts );
113
115[[nodiscard]] MRMESH_API FaceBitSet getInnerFaces( const MeshTopology & topology, const VertBitSet & verts );
116
118[[nodiscard]] MRMESH_API EdgeBitSet getRegionEdges( const MeshTopology& topology, const FaceBitSet& faces );
119
121[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getIncidentEdges( const MeshTopology& topology, const FaceBitSet& faces );
122
124[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getIncidentEdges( const MeshTopology& topology, const UndirectedEdgeBitSet& edges );
125
127[[nodiscard]] MRMESH_API VertBitSet getIncidentVerts( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
128
130[[nodiscard]] MRMESH_API FaceBitSet getIncidentFaces( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
131
133[[nodiscard]] MRMESH_API FaceBitSet getNeighborFaces( const MeshTopology& topology, const UndirectedEdgeBitSet& edges );
134
136[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getInnerEdges( const MeshTopology & topology, const VertBitSet& verts );
137
139[[nodiscard]] MRMESH_API UndirectedEdgeBitSet getInnerEdges( const MeshTopology & topology, const FaceBitSet& region );
140
143[[nodiscard]] MRMESH_API const VertBitSet & getIncidentVerts( const MeshTopology & topology, const UndirectedEdgeBitSet * edges, VertBitSet & store );
144
146[[nodiscard]] MRMESH_API VertBitSet getInnerVerts( const MeshTopology & topology, const UndirectedEdgeBitSet & edges );
147
148}
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRMeshTopology.h:23
std::vector< EdgeId > EdgeLoop
Definition MRMeshFwd.h:150
Turn
what way a path can follow in case of several alternatives
Definition MREnums.h:117
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:149
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)
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:13
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:119
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:23