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

Function getSubdividePart

source/MRMesh/MRMeshDecimate.cpp:1006–1019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004}
1005
1006FaceBitSet getSubdividePart( const FaceBitSet & valids, size_t subdivideParts, size_t myPart )
1007{
1008 assert( subdivideParts > 1 );
1009 const auto sz = subdivideParts;
1010 assert( myPart < sz );
1011 const auto facesPerPart = ( valids.size() / ( sz * FaceBitSet::bits_per_block ) ) * FaceBitSet::bits_per_block;
1012
1013 const auto fromFace = myPart * facesPerPart;
1014 const auto toFace = ( myPart + 1 ) < sz ? ( myPart + 1 ) * facesPerPart : valids.size();
1015 FaceBitSet res( toFace );
1016 res.set( FaceId{ fromFace }, toFace - fromFace, true );
1017 res &= valids;
1018 return res;
1019}
1020
1021static DecimateResult decimateMeshParallelInplace( MR::Mesh & mesh, const DecimateSettings & settings )
1022{

Callers 1

Calls 2

sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected