MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getComponentVerts

Function getComponentVerts

source/MRMesh/MRMeshComponents.cpp:60–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60VertBitSet getComponentVerts( const Mesh& mesh, VertId id, const VertBitSet* region /*= nullptr */ )
61{
62 MR_TIMER;
63 auto unionFindStruct = getUnionFindStructureVerts( mesh, region );
64 const VertBitSet& vertsRegion = mesh.topology.getVertIds( region );
65
66 int vertRoot = unionFindStruct.find( id );
67 const auto& allRoots = unionFindStruct.roots();
68 VertBitSet res;
69 res.resize( allRoots.size() );
70 for ( auto v : vertsRegion )
71 {
72 if ( allRoots[v] == vertRoot )
73 res.set( v );
74 }
75 return res;
76
77}
78
79FaceBitSet getLargestComponent( const MeshPart& meshPart, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd, float minArea, int * numSmallerComponents )
80{

Callers

nothing calls this directly

Calls 5

findMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected