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

Go to the source code of this file.

Typedefs

typedef struct MR_Polyline2 MR_Polyline2
 
typedef struct MR_Polyline3 MR_Polyline3
 
typedef struct MR_VertBitSet MR_VertBitSet
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_function_void_from_MR_EdgeId_MR_EdgeId MR_std_function_void_from_MR_EdgeId_MR_EdgeId
 
typedef struct MR_std_function_void_from_MR_VertId MR_std_function_void_from_MR_VertId
 
typedef struct MR_PolylineSubdivideSettings MR_PolylineSubdivideSettings
 Generated from class MR::PolylineSubdivideSettings.
 

Functions

MRC_API const float * MR_PolylineSubdivideSettings_Get_maxEdgeLen (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_maxEdgeLen (MR_PolylineSubdivideSettings *_this, float value)
 
MRC_API float * MR_PolylineSubdivideSettings_GetMutable_maxEdgeLen (MR_PolylineSubdivideSettings *_this)
 
MRC_API const int32_t * MR_PolylineSubdivideSettings_Get_maxEdgeSplits (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_maxEdgeSplits (MR_PolylineSubdivideSettings *_this, int32_t value)
 
MRC_API int32_t * MR_PolylineSubdivideSettings_GetMutable_maxEdgeSplits (MR_PolylineSubdivideSettings *_this)
 
MRC_API MR_VertBitSet *const * MR_PolylineSubdivideSettings_Get_region (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_region (MR_PolylineSubdivideSettings *_this, MR_VertBitSet *value)
 
MRC_API MR_VertBitSet ** MR_PolylineSubdivideSettings_GetMutable_region (MR_PolylineSubdivideSettings *_this)
 
MRC_API MR_VertBitSet *const * MR_PolylineSubdivideSettings_Get_newVerts (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_newVerts (MR_PolylineSubdivideSettings *_this, MR_VertBitSet *value)
 
MRC_API MR_VertBitSet ** MR_PolylineSubdivideSettings_GetMutable_newVerts (MR_PolylineSubdivideSettings *_this)
 
MRC_API const bool * MR_PolylineSubdivideSettings_Get_useCurvature (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_useCurvature (MR_PolylineSubdivideSettings *_this, bool value)
 
MRC_API bool * MR_PolylineSubdivideSettings_GetMutable_useCurvature (MR_PolylineSubdivideSettings *_this)
 
MRC_API const MR_std_function_void_from_MR_VertIdMR_PolylineSubdivideSettings_Get_onVertCreated (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_onVertCreated (MR_PolylineSubdivideSettings *_this, MR_PassBy value_pass_by, MR_std_function_void_from_MR_VertId *value)
 
MRC_API MR_std_function_void_from_MR_VertIdMR_PolylineSubdivideSettings_GetMutable_onVertCreated (MR_PolylineSubdivideSettings *_this)
 
MRC_API const MR_std_function_void_from_MR_EdgeId_MR_EdgeIdMR_PolylineSubdivideSettings_Get_onEdgeSplit (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_onEdgeSplit (MR_PolylineSubdivideSettings *_this, MR_PassBy value_pass_by, MR_std_function_void_from_MR_EdgeId_MR_EdgeId *value)
 
MRC_API MR_std_function_void_from_MR_EdgeId_MR_EdgeIdMR_PolylineSubdivideSettings_GetMutable_onEdgeSplit (MR_PolylineSubdivideSettings *_this)
 
MRC_API const MR_std_function_bool_from_floatMR_PolylineSubdivideSettings_Get_progressCallback (const MR_PolylineSubdivideSettings *_this)
 
MRC_API void MR_PolylineSubdivideSettings_Set_progressCallback (MR_PolylineSubdivideSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
 
MRC_API MR_std_function_bool_from_floatMR_PolylineSubdivideSettings_GetMutable_progressCallback (MR_PolylineSubdivideSettings *_this)
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_DefaultConstruct (void)
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_ConstructFrom (float maxEdgeLen, int32_t maxEdgeSplits, MR_VertBitSet *region, MR_VertBitSet *newVerts, bool useCurvature, MR_PassBy onVertCreated_pass_by, MR_std_function_void_from_MR_VertId *onVertCreated, MR_PassBy onEdgeSplit_pass_by, MR_std_function_void_from_MR_EdgeId_MR_EdgeId *onEdgeSplit, MR_PassBy progressCallback_pass_by, MR_std_function_bool_from_float *progressCallback)
 
MRC_API const MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_OffsetPtr (const MR_PolylineSubdivideSettings *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.
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_OffsetMutablePtr (MR_PolylineSubdivideSettings *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.
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_ConstructFromAnother (MR_PassBy _other_pass_by, MR_PolylineSubdivideSettings *_other)
 
MRC_API void MR_PolylineSubdivideSettings_Destroy (const MR_PolylineSubdivideSettings *_this)
 Destroys a heap-allocated instance of MR_PolylineSubdivideSettings. Does nothing if the pointer is null.
 
MRC_API void MR_PolylineSubdivideSettings_DestroyArray (const MR_PolylineSubdivideSettings *_this)
 Destroys a heap-allocated array of MR_PolylineSubdivideSettings. Does nothing if the pointer is null.
 
MRC_API MR_PolylineSubdivideSettingsMR_PolylineSubdivideSettings_AssignFromAnother (MR_PolylineSubdivideSettings *_this, MR_PassBy _other_pass_by, MR_PolylineSubdivideSettings *_other)
 
MRC_API int32_t MR_subdividePolyline_MR_Polyline2 (MR_Polyline2 *polyline, const MR_PolylineSubdivideSettings *settings)
 
MRC_API int32_t MR_subdividePolyline_MR_Polyline3 (MR_Polyline3 *polyline, const MR_PolylineSubdivideSettings *settings)
 

Typedef Documentation

◆ MR_Polyline2

typedef struct MR_Polyline2 MR_Polyline2

◆ MR_Polyline3

typedef struct MR_Polyline3 MR_Polyline3

◆ MR_PolylineSubdivideSettings

◆ MR_std_function_bool_from_float

◆ MR_std_function_void_from_MR_EdgeId_MR_EdgeId

◆ MR_std_function_void_from_MR_VertId

◆ MR_VertBitSet

typedef struct MR_VertBitSet MR_VertBitSet

Function Documentation

◆ MR_PolylineSubdivideSettings_AssignFromAnother()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_AssignFromAnother ( MR_PolylineSubdivideSettings * _this,
MR_PassBy _other_pass_by,
MR_PolylineSubdivideSettings * _other )

Generated from a method of class MR::PolylineSubdivideSettings named operator=. 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_PolylineSubdivideSettings_ConstructFrom()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_ConstructFrom ( float maxEdgeLen,
int32_t maxEdgeSplits,
MR_VertBitSet * region,
MR_VertBitSet * newVerts,
bool useCurvature,
MR_PassBy onVertCreated_pass_by,
MR_std_function_void_from_MR_VertId * onVertCreated,
MR_PassBy onEdgeSplit_pass_by,
MR_std_function_void_from_MR_EdgeId_MR_EdgeId * onEdgeSplit,
MR_PassBy progressCallback_pass_by,
MR_std_function_bool_from_float * progressCallback )

Constructs MR::PolylineSubdivideSettings elementwise. Never returns null. Returns an instance allocated on the heap! Must call MR_PolylineSubdivideSettings_Destroy() to free it when you're done using it.

◆ MR_PolylineSubdivideSettings_ConstructFromAnother()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_PolylineSubdivideSettings * _other )

Generated from a constructor of class MR::PolylineSubdivideSettings. Never returns null. Returns an instance allocated on the heap! Must call MR_PolylineSubdivideSettings_Destroy() to free it when you're done using it.

◆ MR_PolylineSubdivideSettings_DefaultConstruct()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_DefaultConstruct ( void )

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

◆ MR_PolylineSubdivideSettings_DefaultConstructArray()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_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_PolylineSubdivideSettings_DestroyArray(). Use MR_PolylineSubdivideSettings_OffsetMutablePtr() and MR_PolylineSubdivideSettings_OffsetPtr() to access the array elements.

◆ MR_PolylineSubdivideSettings_Destroy()

MRC_API void MR_PolylineSubdivideSettings_Destroy ( const MR_PolylineSubdivideSettings * _this)

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

◆ MR_PolylineSubdivideSettings_DestroyArray()

MRC_API void MR_PolylineSubdivideSettings_DestroyArray ( const MR_PolylineSubdivideSettings * _this)

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

◆ MR_PolylineSubdivideSettings_Get_maxEdgeLen()

MRC_API const float * MR_PolylineSubdivideSettings_Get_maxEdgeLen ( const MR_PolylineSubdivideSettings * _this)

Subdivision is stopped when all edges are not longer than this value Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named maxEdgeLen. 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_PolylineSubdivideSettings_Get_maxEdgeSplits()

MRC_API const int32_t * MR_PolylineSubdivideSettings_Get_maxEdgeSplits ( const MR_PolylineSubdivideSettings * _this)

Maximum number of edge splits allowed Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named maxEdgeSplits. 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_PolylineSubdivideSettings_Get_newVerts()

MRC_API MR_VertBitSet *const * MR_PolylineSubdivideSettings_Get_newVerts ( const MR_PolylineSubdivideSettings * _this)

New vertices appeared during subdivision will be added here Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named newVerts. 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_PolylineSubdivideSettings_Get_onEdgeSplit()

MRC_API const MR_std_function_void_from_MR_EdgeId_MR_EdgeId * MR_PolylineSubdivideSettings_Get_onEdgeSplit ( const MR_PolylineSubdivideSettings * _this)

this function is called each time edge (e) is split into (e1->e) Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named onEdgeSplit. 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_PolylineSubdivideSettings_Get_onVertCreated()

MRC_API const MR_std_function_void_from_MR_VertId * MR_PolylineSubdivideSettings_Get_onVertCreated ( const MR_PolylineSubdivideSettings * _this)

this function is called each time a new vertex has been created Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named onVertCreated. 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_PolylineSubdivideSettings_Get_progressCallback()

MRC_API const MR_std_function_bool_from_float * MR_PolylineSubdivideSettings_Get_progressCallback ( const MR_PolylineSubdivideSettings * _this)

callback to report algorithm progress and cancel it by user request Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named progressCallback. 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_PolylineSubdivideSettings_Get_region()

MRC_API MR_VertBitSet *const * MR_PolylineSubdivideSettings_Get_region ( const MR_PolylineSubdivideSettings * _this)

Region on polyline to be subdivided: both edge vertices must be there to allow spitting, it is updated during the operation Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named region. 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_PolylineSubdivideSettings_Get_useCurvature()

MRC_API const bool * MR_PolylineSubdivideSettings_Get_useCurvature ( const MR_PolylineSubdivideSettings * _this)

This option works best for natural lines, where all segments have similar size, and no sharp angles in between Returns a pointer to a member variable of class MR::PolylineSubdivideSettings named useCurvature. 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_PolylineSubdivideSettings_GetMutable_maxEdgeLen()

MRC_API float * MR_PolylineSubdivideSettings_GetMutable_maxEdgeLen ( MR_PolylineSubdivideSettings * _this)

Subdivision is stopped when all edges are not longer than this value Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named maxEdgeLen. 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_PolylineSubdivideSettings_GetMutable_maxEdgeSplits()

MRC_API int32_t * MR_PolylineSubdivideSettings_GetMutable_maxEdgeSplits ( MR_PolylineSubdivideSettings * _this)

Maximum number of edge splits allowed Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named maxEdgeSplits. 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_PolylineSubdivideSettings_GetMutable_newVerts()

MRC_API MR_VertBitSet ** MR_PolylineSubdivideSettings_GetMutable_newVerts ( MR_PolylineSubdivideSettings * _this)

New vertices appeared during subdivision will be added here Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named newVerts. 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_PolylineSubdivideSettings_GetMutable_onEdgeSplit()

MRC_API MR_std_function_void_from_MR_EdgeId_MR_EdgeId * MR_PolylineSubdivideSettings_GetMutable_onEdgeSplit ( MR_PolylineSubdivideSettings * _this)

this function is called each time edge (e) is split into (e1->e) Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named onEdgeSplit. 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_PolylineSubdivideSettings_GetMutable_onVertCreated()

MRC_API MR_std_function_void_from_MR_VertId * MR_PolylineSubdivideSettings_GetMutable_onVertCreated ( MR_PolylineSubdivideSettings * _this)

this function is called each time a new vertex has been created Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named onVertCreated. 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_PolylineSubdivideSettings_GetMutable_progressCallback()

MRC_API MR_std_function_bool_from_float * MR_PolylineSubdivideSettings_GetMutable_progressCallback ( MR_PolylineSubdivideSettings * _this)

callback to report algorithm progress and cancel it by user request Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named progressCallback. 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_PolylineSubdivideSettings_GetMutable_region()

MRC_API MR_VertBitSet ** MR_PolylineSubdivideSettings_GetMutable_region ( MR_PolylineSubdivideSettings * _this)

Region on polyline to be subdivided: both edge vertices must be there to allow spitting, it is updated during the operation Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named region. 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_PolylineSubdivideSettings_GetMutable_useCurvature()

MRC_API bool * MR_PolylineSubdivideSettings_GetMutable_useCurvature ( MR_PolylineSubdivideSettings * _this)

This option works best for natural lines, where all segments have similar size, and no sharp angles in between Returns a mutable pointer to a member variable of class MR::PolylineSubdivideSettings named useCurvature. 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_PolylineSubdivideSettings_OffsetMutablePtr()

MRC_API MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_OffsetMutablePtr ( MR_PolylineSubdivideSettings * 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.

◆ MR_PolylineSubdivideSettings_OffsetPtr()

MRC_API const MR_PolylineSubdivideSettings * MR_PolylineSubdivideSettings_OffsetPtr ( const MR_PolylineSubdivideSettings * 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.

◆ MR_PolylineSubdivideSettings_Set_maxEdgeLen()

MRC_API void MR_PolylineSubdivideSettings_Set_maxEdgeLen ( MR_PolylineSubdivideSettings * _this,
float value )

Subdivision is stopped when all edges are not longer than this value Modifies a member variable of class MR::PolylineSubdivideSettings named maxEdgeLen. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_maxEdgeSplits()

MRC_API void MR_PolylineSubdivideSettings_Set_maxEdgeSplits ( MR_PolylineSubdivideSettings * _this,
int32_t value )

Maximum number of edge splits allowed Modifies a member variable of class MR::PolylineSubdivideSettings named maxEdgeSplits. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_newVerts()

MRC_API void MR_PolylineSubdivideSettings_Set_newVerts ( MR_PolylineSubdivideSettings * _this,
MR_VertBitSet * value )

New vertices appeared during subdivision will be added here Modifies a member variable of class MR::PolylineSubdivideSettings named newVerts. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_onEdgeSplit()

MRC_API void MR_PolylineSubdivideSettings_Set_onEdgeSplit ( MR_PolylineSubdivideSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_void_from_MR_EdgeId_MR_EdgeId * value )

this function is called each time edge (e) is split into (e1->e) Modifies a member variable of class MR::PolylineSubdivideSettings named onEdgeSplit. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_onVertCreated()

MRC_API void MR_PolylineSubdivideSettings_Set_onVertCreated ( MR_PolylineSubdivideSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_void_from_MR_VertId * value )

this function is called each time a new vertex has been created Modifies a member variable of class MR::PolylineSubdivideSettings named onVertCreated. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_progressCallback()

MRC_API void MR_PolylineSubdivideSettings_Set_progressCallback ( MR_PolylineSubdivideSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_bool_from_float * value )

callback to report algorithm progress and cancel it by user request Modifies a member variable of class MR::PolylineSubdivideSettings named progressCallback. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_region()

MRC_API void MR_PolylineSubdivideSettings_Set_region ( MR_PolylineSubdivideSettings * _this,
MR_VertBitSet * value )

Region on polyline to be subdivided: both edge vertices must be there to allow spitting, it is updated during the operation Modifies a member variable of class MR::PolylineSubdivideSettings named region. Parameter _this can not be null. It is a single object.

◆ MR_PolylineSubdivideSettings_Set_useCurvature()

MRC_API void MR_PolylineSubdivideSettings_Set_useCurvature ( MR_PolylineSubdivideSettings * _this,
bool value )

This option works best for natural lines, where all segments have similar size, and no sharp angles in between Modifies a member variable of class MR::PolylineSubdivideSettings named useCurvature. Parameter _this can not be null. It is a single object.

◆ MR_subdividePolyline_MR_Polyline2()

MRC_API int32_t MR_subdividePolyline_MR_Polyline2 ( MR_Polyline2 * polyline,
const MR_PolylineSubdivideSettings * settings )

Split edges in polyline according to the settings;

Returns
The total number of edge splits performed Generated from function MR::subdividePolyline. Parameter polyline can not be null. It is a single object. Parameter settings is a single object. Parameter settings has a default argument: {}, pass a null pointer to use it.

◆ MR_subdividePolyline_MR_Polyline3()

MRC_API int32_t MR_subdividePolyline_MR_Polyline3 ( MR_Polyline3 * polyline,
const MR_PolylineSubdivideSettings * settings )

Generated from function MR::subdividePolyline. Parameter polyline can not be null. It is a single object. Parameter settings is a single object. Parameter settings has a default argument: {}, pass a null pointer to use it.