4#include "MRPch/MRBindingMacros.h"
35using BetterDupContinuation = std::function<bool( VertId e0, VertId e1, VertId vRef, VertId vCand, VertId vBest )>;
43 std::vector<VertDuplication>* dups =
nullptr, VertId lastValidVert = {},
const BetterDupContinuation & betterCont = {} );
86 void setNumChains( std::uint32_t openChains, std::uint32_t closedChains )
94 assert( repeatedVerts >= 1 );
109 std::uint32_t data_ = 0;
111static_assert(
sizeof(
VertInfo ) == 4 );
119 auto asPair()
const {
return std::make_pair(
v,
f ); }
#define MRMESH_API
Definition MRMeshFwd.h:85
std::uint32_t numClosedChains() const
the number of closed chains (rings) of connected triangles around the vertex; 0 if hasRepeatedVerts()
Definition MRVertDuplication.h:63
std::uint32_t maxVertRepetitions() const
the maximum number of a neighbor vertex repetitions; 0 if !hasRepeatedVerts()
Definition MRVertDuplication.h:57
bool areTwinChains(std::uint32_t numTris) const
Definition MRVertDuplication.h:81
MR_BIND_IGNORE_PY VertInfo inspectVertNeighbourhood(const Triangulation &t, const VertTri *begin, const VertTri *end)
static constexpr std::uint32_t maxNumRepeatedVerts
Definition MRVertDuplication.h:105
VertId dupVert
new vertex after duplication
Definition MRVertDuplication.h:23
std::uint32_t numChains() const
the total number of open and closed chains of connected triangles around the vertex; 0 if hasRepeated...
Definition MRVertDuplication.h:66
void setNumChains(std::uint32_t openChains, std::uint32_t closedChains)
Definition MRVertDuplication.h:86
void setNumRepeatedVerts(std::uint32_t repeatedVerts, std::uint32_t maxVertRepetitions)
Definition MRVertDuplication.h:92
auto asPair() const
Definition MRVertDuplication.h:119
FaceId f
Definition MRVertDuplication.h:117
bool duplicationNeeded() const
Definition MRVertDuplication.h:70
size_t duplicateNonManifoldVertices(Triangulation &t, FaceBitSet *region=nullptr, std::vector< VertDuplication > *dups=nullptr, VertId lastValidVert={}, const BetterDupContinuation &betterCont={})
static constexpr std::uint32_t maxNumClosedChains
Definition MRVertDuplication.h:104
std::uint32_t numRepeatedVerts() const
the total number of neighbor vertex repetitions; 0 if !hasRepeatedVerts()
Definition MRVertDuplication.h:54
VertId v
Definition MRVertDuplication.h:116
std::function< bool(VertId e0, VertId e1, VertId vRef, VertId vCand, VertId vBest)> BetterDupContinuation
Definition MRVertDuplication.h:35
std::uint32_t numOpenChains() const
the number of open chains of connected triangles around the vertex; 0 if hasRepeatedVerts()
Definition MRVertDuplication.h:60
friend bool operator<(const VertTri &l, const VertTri &r)
Definition MRVertDuplication.h:120
static constexpr std::uint32_t maxMaxVertRepetitions
Definition MRVertDuplication.h:106
VertId srcVert
original vertex before duplication
Definition MRVertDuplication.h:22
static constexpr std::uint32_t maxNumOpenChains
maximal values storable in the counters
Definition MRVertDuplication.h:103
bool hasRepeatedVerts() const
true if some neighbor vertex is present in more than one triangle-pair around the vertex
Definition MRVertDuplication.h:51
auto begin(ViewportMask mask)
Definition MRViewportId.h:122
auto end(ViewportMask)
Definition MRViewportId.h:124
Building topologies by triangles.
Definition MRIdentifyVertices.h:16
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRVertDuplication.h:21
Definition MRVertDuplication.h:49
describes a vertex and one of triangles incident to it
Definition MRVertDuplication.h:115