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

Go to the source code of this file.

Typedefs

typedef struct MR_PointCloud MR_PointCloud
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_optional_MR_VertBitSet MR_std_optional_MR_VertBitSet
 

Functions

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

Typedef Documentation

◆ MR_PointCloud

typedef struct MR_PointCloud MR_PointCloud

◆ MR_std_function_bool_from_float

◆ MR_std_optional_MR_VertBitSet

Function Documentation

◆ MR_pointIterativeSampling()

MRC_API MR_std_optional_MR_VertBitSet * MR_pointIterativeSampling ( const MR_PointCloud * cloud,
int32_t 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.