MeshLib C Docs
Loading...
Searching...
No Matches
MRUniformSampling.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_PointCloud MR_PointCloud
 
typedef struct MR_VertCoords MR_VertCoords
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_optional_MR_PointCloud MR_std_optional_MR_PointCloud
 
typedef struct MR_std_optional_MR_VertBitSet MR_std_optional_MR_VertBitSet
 
typedef struct MR_UniformSamplingSettings MR_UniformSamplingSettings
 

Functions

MRC_API const float * MR_UniformSamplingSettings_Get_distance (const MR_UniformSamplingSettings *_this)
 
MRC_API void MR_UniformSamplingSettings_Set_distance (MR_UniformSamplingSettings *_this, float value)
 
MRC_API float * MR_UniformSamplingSettings_GetMutable_distance (MR_UniformSamplingSettings *_this)
 
MRC_API const float * MR_UniformSamplingSettings_Get_minNormalDot (const MR_UniformSamplingSettings *_this)
 
MRC_API void MR_UniformSamplingSettings_Set_minNormalDot (MR_UniformSamplingSettings *_this, float value)
 
MRC_API float * MR_UniformSamplingSettings_GetMutable_minNormalDot (MR_UniformSamplingSettings *_this)
 
MRC_API const bool * MR_UniformSamplingSettings_Get_lexicographicalOrder (const MR_UniformSamplingSettings *_this)
 
MRC_API void MR_UniformSamplingSettings_Set_lexicographicalOrder (MR_UniformSamplingSettings *_this, bool value)
 
MRC_API bool * MR_UniformSamplingSettings_GetMutable_lexicographicalOrder (MR_UniformSamplingSettings *_this)
 
MRC_API const MR_VertCoords *const * MR_UniformSamplingSettings_Get_pNormals (const MR_UniformSamplingSettings *_this)
 
MRC_API void MR_UniformSamplingSettings_Set_pNormals (MR_UniformSamplingSettings *_this, const MR_VertCoords *value)
 
MRC_API const MR_VertCoords ** MR_UniformSamplingSettings_GetMutable_pNormals (MR_UniformSamplingSettings *_this)
 
MRC_API const MR_std_function_bool_from_floatMR_UniformSamplingSettings_Get_progress (const MR_UniformSamplingSettings *_this)
 
MRC_API void MR_UniformSamplingSettings_Set_progress (MR_UniformSamplingSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
 
MRC_API MR_std_function_bool_from_floatMR_UniformSamplingSettings_GetMutable_progress (MR_UniformSamplingSettings *_this)
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_DefaultConstruct (void)
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_ConstructFrom (float distance, float minNormalDot, bool lexicographicalOrder, const MR_VertCoords *pNormals, MR_PassBy progress_pass_by, MR_std_function_bool_from_float *progress)
 
MRC_API const MR_UniformSamplingSettingsMR_UniformSamplingSettings_OffsetPtr (const MR_UniformSamplingSettings *ptr, ptrdiff_t i)
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_OffsetMutablePtr (MR_UniformSamplingSettings *ptr, ptrdiff_t i)
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_ConstructFromAnother (MR_PassBy _other_pass_by, MR_UniformSamplingSettings *_other)
 
MRC_API void MR_UniformSamplingSettings_Destroy (const MR_UniformSamplingSettings *_this)
 Destroys a heap-allocated instance of MR_UniformSamplingSettings. Does nothing if the pointer is null.
 
MRC_API void MR_UniformSamplingSettings_DestroyArray (const MR_UniformSamplingSettings *_this)
 Destroys a heap-allocated array of MR_UniformSamplingSettings. Does nothing if the pointer is null.
 
MRC_API MR_UniformSamplingSettingsMR_UniformSamplingSettings_AssignFromAnother (MR_UniformSamplingSettings *_this, MR_PassBy _other_pass_by, MR_UniformSamplingSettings *_other)
 
MRC_API MR_std_optional_MR_VertBitSetMR_pointUniformSampling (const MR_PointCloud *pointCloud, const MR_UniformSamplingSettings *settings)
 
MRC_API MR_std_optional_MR_PointCloudMR_makeUniformSampledCloud (const MR_PointCloud *pointCloud, const MR_UniformSamplingSettings *settings)
 

Typedef Documentation

◆ MR_PointCloud

typedef struct MR_PointCloud MR_PointCloud

◆ MR_std_function_bool_from_float

◆ MR_std_optional_MR_PointCloud

◆ MR_std_optional_MR_VertBitSet

◆ MR_UniformSamplingSettings

Generated from class MR::UniformSamplingSettings. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_VertCoords

typedef struct MR_VertCoords MR_VertCoords

Function Documentation

◆ MR_makeUniformSampledCloud()

MRC_API MR_std_optional_MR_PointCloud * MR_makeUniformSampledCloud ( const MR_PointCloud * pointCloud,
const MR_UniformSamplingSettings * settings )

Composes new point cloud consisting of uniform samples of original point cloud; returns std::nullopt if it was terminated by the callback Generated from function MR::makeUniformSampledCloud. Parameter pointCloud can not be null. It is a single object. Parameter settings can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_PointCloud_Destroy() to free it when you're done using it.

◆ MR_pointUniformSampling()

MRC_API MR_std_optional_MR_VertBitSet * MR_pointUniformSampling ( const MR_PointCloud * pointCloud,
const MR_UniformSamplingSettings * settings )

Sample vertices, removing ones that are too close; returns std::nullopt if it was terminated by the callback Generated from function MR::pointUniformSampling. Parameter pointCloud can not be null. It is a single object. Parameter settings can not be null. It is a single object. 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.

◆ MR_UniformSamplingSettings_AssignFromAnother()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_AssignFromAnother ( MR_UniformSamplingSettings * _this,
MR_PassBy _other_pass_by,
MR_UniformSamplingSettings * _other )

Generated from method MR::UniformSamplingSettings::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it had previously.

◆ MR_UniformSamplingSettings_ConstructFrom()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_ConstructFrom ( float distance,
float minNormalDot,
bool lexicographicalOrder,
const MR_VertCoords * pNormals,
MR_PassBy progress_pass_by,
MR_std_function_bool_from_float * progress )

Constructs MR::UniformSamplingSettings elementwise. The reference to the parameter pNormals might be preserved in the constructed object. The reference to the parameter progress might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_UniformSamplingSettings_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it had previously.

◆ MR_UniformSamplingSettings_ConstructFromAnother()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_UniformSamplingSettings * _other )

Generated from constructor MR::UniformSamplingSettings::UniformSamplingSettings. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_UniformSamplingSettings_Destroy() to free it when you're done using it.

◆ MR_UniformSamplingSettings_DefaultConstruct()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UniformSamplingSettings_Destroy() to free it when you're done using it.

◆ MR_UniformSamplingSettings_DefaultConstructArray()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UniformSamplingSettings_DestroyArray(). Use MR_UniformSamplingSettings_OffsetMutablePtr() and MR_UniformSamplingSettings_OffsetPtr() to access the array elements.

◆ MR_UniformSamplingSettings_Destroy()

MRC_API void MR_UniformSamplingSettings_Destroy ( const MR_UniformSamplingSettings * _this)

Destroys a heap-allocated instance of MR_UniformSamplingSettings. Does nothing if the pointer is null.

◆ MR_UniformSamplingSettings_DestroyArray()

MRC_API void MR_UniformSamplingSettings_DestroyArray ( const MR_UniformSamplingSettings * _this)

Destroys a heap-allocated array of MR_UniformSamplingSettings. Does nothing if the pointer is null.

◆ MR_UniformSamplingSettings_Get_distance()

MRC_API const float * MR_UniformSamplingSettings_Get_distance ( const MR_UniformSamplingSettings * _this)

minimal distance between samples Returns a pointer to a member variable of class MR::UniformSamplingSettings named distance. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_Get_lexicographicalOrder()

MRC_API const bool * MR_UniformSamplingSettings_Get_lexicographicalOrder ( const MR_UniformSamplingSettings * _this)

if true process the points in lexicographical order, which gives tighter and more uniform samples; if false process the points according to their ids, which is faster Returns a pointer to a member variable of class MR::UniformSamplingSettings named lexicographicalOrder. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_Get_minNormalDot()

MRC_API const float * MR_UniformSamplingSettings_Get_minNormalDot ( const MR_UniformSamplingSettings * _this)

if point cloud has normals then automatically decreases local distance to make sure that all points inside have absolute normal dot product not less than this value; this is to make sampling denser in the regions of high curvature; value <=0 means ignore normals; value >=1 means select all points (practically useless) Returns a pointer to a member variable of class MR::UniformSamplingSettings named minNormalDot. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_Get_pNormals()

MRC_API const MR_VertCoords *const * MR_UniformSamplingSettings_Get_pNormals ( const MR_UniformSamplingSettings * _this)

if not nullptr then these normals will be used during sampling instead of normals in the cloud itself Returns a pointer to a member variable of class MR::UniformSamplingSettings named pNormals. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_Get_progress()

MRC_API const MR_std_function_bool_from_float * MR_UniformSamplingSettings_Get_progress ( const MR_UniformSamplingSettings * _this)

to report progress and cancel processing Returns a pointer to a member variable of class MR::UniformSamplingSettings named progress. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_GetMutable_distance()

MRC_API float * MR_UniformSamplingSettings_GetMutable_distance ( MR_UniformSamplingSettings * _this)

minimal distance between samples Returns a mutable pointer to a member variable of class MR::UniformSamplingSettings named distance. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_GetMutable_lexicographicalOrder()

MRC_API bool * MR_UniformSamplingSettings_GetMutable_lexicographicalOrder ( MR_UniformSamplingSettings * _this)

if true process the points in lexicographical order, which gives tighter and more uniform samples; if false process the points according to their ids, which is faster Returns a mutable pointer to a member variable of class MR::UniformSamplingSettings named lexicographicalOrder. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_GetMutable_minNormalDot()

MRC_API float * MR_UniformSamplingSettings_GetMutable_minNormalDot ( MR_UniformSamplingSettings * _this)

if point cloud has normals then automatically decreases local distance to make sure that all points inside have absolute normal dot product not less than this value; this is to make sampling denser in the regions of high curvature; value <=0 means ignore normals; value >=1 means select all points (practically useless) Returns a mutable pointer to a member variable of class MR::UniformSamplingSettings named minNormalDot. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_GetMutable_pNormals()

MRC_API const MR_VertCoords ** MR_UniformSamplingSettings_GetMutable_pNormals ( MR_UniformSamplingSettings * _this)

if not nullptr then these normals will be used during sampling instead of normals in the cloud itself Returns a mutable pointer to a member variable of class MR::UniformSamplingSettings named pNormals. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_GetMutable_progress()

MRC_API MR_std_function_bool_from_float * MR_UniformSamplingSettings_GetMutable_progress ( MR_UniformSamplingSettings * _this)

to report progress and cancel processing Returns a mutable pointer to a member variable of class MR::UniformSamplingSettings named progress. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniformSamplingSettings_OffsetMutablePtr()

MRC_API MR_UniformSamplingSettings * MR_UniformSamplingSettings_OffsetMutablePtr ( MR_UniformSamplingSettings * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_UniformSamplingSettings_OffsetPtr()

MRC_API const MR_UniformSamplingSettings * MR_UniformSamplingSettings_OffsetPtr ( const MR_UniformSamplingSettings * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_UniformSamplingSettings_Set_distance()

MRC_API void MR_UniformSamplingSettings_Set_distance ( MR_UniformSamplingSettings * _this,
float value )

minimal distance between samples Modifies a member variable of class MR::UniformSamplingSettings named distance. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it had previously in distance.

◆ MR_UniformSamplingSettings_Set_lexicographicalOrder()

MRC_API void MR_UniformSamplingSettings_Set_lexicographicalOrder ( MR_UniformSamplingSettings * _this,
bool value )

if true process the points in lexicographical order, which gives tighter and more uniform samples; if false process the points according to their ids, which is faster Modifies a member variable of class MR::UniformSamplingSettings named lexicographicalOrder. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it had previously in lexicographicalOrder.

◆ MR_UniformSamplingSettings_Set_minNormalDot()

MRC_API void MR_UniformSamplingSettings_Set_minNormalDot ( MR_UniformSamplingSettings * _this,
float value )

if point cloud has normals then automatically decreases local distance to make sure that all points inside have absolute normal dot product not less than this value; this is to make sampling denser in the regions of high curvature; value <=0 means ignore normals; value >=1 means select all points (practically useless) Modifies a member variable of class MR::UniformSamplingSettings named minNormalDot. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it had previously in minNormalDot.

◆ MR_UniformSamplingSettings_Set_pNormals()

MRC_API void MR_UniformSamplingSettings_Set_pNormals ( MR_UniformSamplingSettings * _this,
const MR_VertCoords * value )

if not nullptr then these normals will be used during sampling instead of normals in the cloud itself Modifies a member variable of class MR::UniformSamplingSettings named pNormals. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element pNormals. When this function is called, this object will drop object references it had previously in pNormals.

◆ MR_UniformSamplingSettings_Set_progress()

MRC_API void MR_UniformSamplingSettings_Set_progress ( MR_UniformSamplingSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_bool_from_float * value )

to report progress and cancel processing Modifies a member variable of class MR::UniformSamplingSettings named progress. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element progress. When this function is called, this object will drop object references it had previously in progress.