MeshLib C Docs
Loading...
Searching...
No Matches
MRIterativeSampling.h File Reference
#include <MRCMisc/exports.h>

Go to the source code of this file.

Functions

MRC_API MR_std_optional_MR_VertBitSetMR_pointIterativeSampling (const MR_PointCloud *cloud, int numSamples, const MR_std_function_bool_from_float *cb)

Function Documentation

◆ MR_pointIterativeSampling()

MRC_API MR_std_optional_MR_VertBitSet * MR_pointIterativeSampling ( const MR_PointCloud * cloud,
int numSamples,
const MR_std_function_bool_from_float * cb )

performs sampling of cloud points by iteratively removing one point with minimal metric (describing distance to the closest point and previous nearby removals), thus allowing stopping at any given number of samples; returns std::nullopt if it was terminated by the callback Generated from function MR::pointIterativeSampling. Parameter cloud can not be null. It is a single object. Parameter cb is a single object. Parameter cb has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertBitSet_Destroy() to free it when you're done using it.