MeshLib
 
Loading...
Searching...
No Matches
PointCloudComponents

Functions

MRMESH_API Expected< VertBitSetMR::PointCloudComponents::getLargeComponentsUnion (const PointCloud &pointCloud, float maxDist, int minSize, ProgressCallback pc={})
 
MRMESH_API Expected< VertBitSetMR::PointCloudComponents::getLargeComponentsUnion (UnionFind< VertId > &unionStructs, const VertBitSet &region, int minSize, ProgressCallback pc={})
 
MRMESH_API Expected< std::vector< VertBitSet > > MR::PointCloudComponents::getLargeComponents (const PointCloud &pointCloud, float maxDist, int minSize, ProgressCallback pc={})
 
MRMESH_API Expected< std::pair< std::vector< VertBitSet >, int > > MR::PointCloudComponents::getAllComponents (const PointCloud &pointCloud, float maxDist, int maxComponentCount=INT_MAX, ProgressCallback pc={})
 
MRMESH_API Expected< UnionFind< VertId > > MR::PointCloudComponents::getUnionFindStructureVerts (const PointCloud &pointCloud, float maxDist, const VertBitSet *region=nullptr, ProgressCallback pc={})
 gets union - find structure for vertices in
 

Detailed Description

Function Documentation

◆ getAllComponents()

MRMESH_API Expected< std::pair< std::vector< VertBitSet >, int > > MR::PointCloudComponents::getAllComponents ( const PointCloud & pointCloud,
float maxDist,
int maxComponentCount = INT_MAX,
ProgressCallback pc = {} )
nodiscard

gets all components of point cloud connected by a distance no greater than

Parameters
maxDist\detail if components number more than the maxComponentCount, they will be combined into groups of the same size
Note
be careful, if point cloud is large enough and has many components, the memory overflow will occur
Parameters
maxComponentCountshould be more then 1
Returns
pair components bitsets vector and number components in one group if components number more than maxComponentCount

◆ getLargeComponents()

MRMESH_API Expected< std::vector< VertBitSet > > MR::PointCloudComponents::getLargeComponents ( const PointCloud & pointCloud,
float maxDist,
int minSize,
ProgressCallback pc = {} )
nodiscard

returns vector of point cloud components containing at least minSize points and connected by a distance no greater than

Parameters
maxDist
minSizemust be more than 1

◆ getLargeComponentsUnion() [1/2]

MRMESH_API Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion ( const PointCloud & pointCloud,
float maxDist,
int minSize,
ProgressCallback pc = {} )
nodiscard

returns the union of point cloud components containing at least minSize points and connected by a distance no greater than

Parameters
maxDist
minSizemust be more than 1

◆ getLargeComponentsUnion() [2/2]

MRMESH_API Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion ( UnionFind< VertId > & unionStructs,
const VertBitSet & region,
int minSize,
ProgressCallback pc = {} )
nodiscard

returns the union of vertices components containing at least minSize points

Parameters
unionStructsprepared point union structure
Note
have side effect: call unionStructs.roots() that change unionStructs

◆ getUnionFindStructureVerts()

MRMESH_API Expected< UnionFind< VertId > > MR::PointCloudComponents::getUnionFindStructureVerts ( const PointCloud & pointCloud,
float maxDist,
const VertBitSet * region = nullptr,
ProgressCallback pc = {} )
nodiscard

gets union - find structure for vertices in

Parameters
regionconnected by a distance no greater than
maxDist