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

Function hasFullySelectedComponent

source/MRMesh/MRMeshComponents.cpp:754–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754bool hasFullySelectedComponent( const MeshTopology& topology, const VertBitSet & selection )
755{
756 MR_TIMER;
757
758 auto unionFindStruct = getUnionFindStructureVerts( topology );
759 const auto& allRoots = unionFindStruct.roots();
760 auto [uniqueRootsMap, k] = getUniqueRootIds( allRoots, topology.getValidVerts() );
761 RegionBitSet remainKeysBitSets( k );
762 for ( VertId v( 0 ); v < uniqueRootsMap.size(); ++v )
763 {
764 if ( selection.test( v ) )
765 continue;
766 if ( auto rId = uniqueRootsMap[v] )
767 remainKeysBitSets.set( rId );
768 }
769 return remainKeysBitSets.count() != remainKeysBitSets.size();
770}
771
772bool hasFullySelectedComponent( const Mesh& mesh, const VertBitSet & selection )
773{

Callers 3

initFromPointsMethod · 0.85
initMethod · 0.85

Calls 6

countMethod · 0.80
getUniqueRootIdsFunction · 0.70
sizeMethod · 0.45
testMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected