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

Go to the source code of this file.

Typedefs

typedef struct MR_FaceBitSet MR_FaceBitSet
 
typedef struct MR_MeshTopology MR_MeshTopology
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_function_float_from_MR_EdgeId MR_std_function_float_from_MR_EdgeId
 
typedef struct MR_std_optional_MR_FaceScalars MR_std_optional_MR_FaceScalars
 
typedef enum MR_FaceDistancesSettings_OutputFaceValues MR_FaceDistancesSettings_OutputFaceValues
 
typedef struct MR_FaceDistancesSettings MR_FaceDistancesSettings
 

Enumerations

enum  MR_FaceDistancesSettings_OutputFaceValues { MR_FaceDistancesSettings_OutputFaceValues_Distances = 0 , MR_FaceDistancesSettings_OutputFaceValues_SeqOrder = 1 }
 

Functions

MRC_API const MR_FaceDistancesSettings_OutputFaceValuesMR_FaceDistancesSettings_Get_out (const MR_FaceDistancesSettings *_this)
 
MRC_API void MR_FaceDistancesSettings_Set_out (MR_FaceDistancesSettings *_this, MR_FaceDistancesSettings_OutputFaceValues value)
 
MRC_API MR_FaceDistancesSettings_OutputFaceValuesMR_FaceDistancesSettings_GetMutable_out (MR_FaceDistancesSettings *_this)
 
MRC_API float *const * MR_FaceDistancesSettings_Get_maxDist (const MR_FaceDistancesSettings *_this)
 
MRC_API void MR_FaceDistancesSettings_Set_maxDist (MR_FaceDistancesSettings *_this, float *value)
 
MRC_API float ** MR_FaceDistancesSettings_GetMutable_maxDist (MR_FaceDistancesSettings *_this)
 
MRC_API const MR_std_function_bool_from_floatMR_FaceDistancesSettings_Get_progress (const MR_FaceDistancesSettings *_this)
 
MRC_API void MR_FaceDistancesSettings_Set_progress (MR_FaceDistancesSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
 
MRC_API MR_std_function_bool_from_floatMR_FaceDistancesSettings_GetMutable_progress (MR_FaceDistancesSettings *_this)
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_DefaultConstruct (void)
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_ConstructFrom (MR_FaceDistancesSettings_OutputFaceValues out, float *maxDist, MR_PassBy progress_pass_by, MR_std_function_bool_from_float *progress)
 
MRC_API const MR_FaceDistancesSettingsMR_FaceDistancesSettings_OffsetPtr (const MR_FaceDistancesSettings *ptr, ptrdiff_t i)
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_OffsetMutablePtr (MR_FaceDistancesSettings *ptr, ptrdiff_t i)
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_ConstructFromAnother (MR_PassBy _other_pass_by, MR_FaceDistancesSettings *_other)
 
MRC_API void MR_FaceDistancesSettings_Destroy (const MR_FaceDistancesSettings *_this)
 Destroys a heap-allocated instance of MR_FaceDistancesSettings. Does nothing if the pointer is null.
 
MRC_API void MR_FaceDistancesSettings_DestroyArray (const MR_FaceDistancesSettings *_this)
 Destroys a heap-allocated array of MR_FaceDistancesSettings. Does nothing if the pointer is null.
 
MRC_API MR_FaceDistancesSettingsMR_FaceDistancesSettings_AssignFromAnother (MR_FaceDistancesSettings *_this, MR_PassBy _other_pass_by, MR_FaceDistancesSettings *_other)
 
MRC_API MR_std_optional_MR_FaceScalarsMR_calcFaceDistances (const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, const MR_FaceBitSet *starts, const MR_FaceDistancesSettings *settings)
 

Typedef Documentation

◆ MR_FaceBitSet

typedef struct MR_FaceBitSet MR_FaceBitSet

◆ MR_FaceDistancesSettings

Generated from class MR::FaceDistancesSettings. 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_FaceDistancesSettings_OutputFaceValues

◆ MR_MeshTopology

◆ MR_std_function_bool_from_float

◆ MR_std_function_float_from_MR_EdgeId

◆ MR_std_optional_MR_FaceScalars

Enumeration Type Documentation

◆ MR_FaceDistancesSettings_OutputFaceValues

Enumerator
MR_FaceDistancesSettings_OutputFaceValues_Distances 

each face will get its distance from start in the result

each face will get its sequential order (1,2,...) from start in the result

MR_FaceDistancesSettings_OutputFaceValues_SeqOrder 

Function Documentation

◆ MR_calcFaceDistances()

MRC_API MR_std_optional_MR_FaceScalars * MR_calcFaceDistances ( const MR_MeshTopology * topology,
const MR_std_function_float_from_MR_EdgeId * metric,
const MR_FaceBitSet * starts,
const MR_FaceDistancesSettings * settings )

computes and returns the distance of traveling from one of start faces to all other reachable faces on the mesh; all unreachable faces will get FLT_MAX value;

Parameters
startsall start faces will get value 0 in the result;
metricmetric(e) says the distance of traveling from left(e) to right(e) Generated from function MR::calcFaceDistances. Parameter topology can not be null. It is a single object. Parameter metric can not be null. It is a single object. Parameter starts 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. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_FaceScalars_Destroy() to free it when you're done using it.

◆ MR_FaceDistancesSettings_AssignFromAnother()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_AssignFromAnother ( MR_FaceDistancesSettings * _this,
MR_PassBy _other_pass_by,
MR_FaceDistancesSettings * _other )

Generated from method MR::FaceDistancesSettings::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_FaceDistancesSettings_ConstructFrom()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_ConstructFrom ( MR_FaceDistancesSettings_OutputFaceValues out,
float * maxDist,
MR_PassBy progress_pass_by,
MR_std_function_bool_from_float * progress )

Constructs MR::FaceDistancesSettings elementwise. The reference to the parameter out might be preserved in the constructed object. The reference to the parameter maxDist 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_FaceDistancesSettings_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_FaceDistancesSettings_ConstructFromAnother()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_FaceDistancesSettings * _other )

Generated from constructor MR::FaceDistancesSettings::FaceDistancesSettings. 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_FaceDistancesSettings_Destroy() to free it when you're done using it.

◆ MR_FaceDistancesSettings_DefaultConstruct()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_DefaultConstruct ( void )

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

◆ MR_FaceDistancesSettings_DefaultConstructArray()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_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_FaceDistancesSettings_DestroyArray(). Use MR_FaceDistancesSettings_OffsetMutablePtr() and MR_FaceDistancesSettings_OffsetPtr() to access the array elements.

◆ MR_FaceDistancesSettings_Destroy()

MRC_API void MR_FaceDistancesSettings_Destroy ( const MR_FaceDistancesSettings * _this)

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

◆ MR_FaceDistancesSettings_DestroyArray()

MRC_API void MR_FaceDistancesSettings_DestroyArray ( const MR_FaceDistancesSettings * _this)

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

◆ MR_FaceDistancesSettings_Get_maxDist()

MRC_API float *const * MR_FaceDistancesSettings_Get_maxDist ( const MR_FaceDistancesSettings * _this)

optional output of the maximal distance to the most distant face Returns a pointer to a member variable of class MR::FaceDistancesSettings named maxDist. 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_FaceDistancesSettings_Get_out()

MRC_API const MR_FaceDistancesSettings_OutputFaceValues * MR_FaceDistancesSettings_Get_out ( const MR_FaceDistancesSettings * _this)

Returns a pointer to a member variable of class MR::FaceDistancesSettings named out. 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_FaceDistancesSettings_Get_progress()

MRC_API const MR_std_function_bool_from_float * MR_FaceDistancesSettings_Get_progress ( const MR_FaceDistancesSettings * _this)

for progress reporting and cancellation Returns a pointer to a member variable of class MR::FaceDistancesSettings 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_FaceDistancesSettings_GetMutable_maxDist()

MRC_API float ** MR_FaceDistancesSettings_GetMutable_maxDist ( MR_FaceDistancesSettings * _this)

optional output of the maximal distance to the most distant face Returns a mutable pointer to a member variable of class MR::FaceDistancesSettings named maxDist. 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_FaceDistancesSettings_GetMutable_out()

MRC_API MR_FaceDistancesSettings_OutputFaceValues * MR_FaceDistancesSettings_GetMutable_out ( MR_FaceDistancesSettings * _this)

Returns a mutable pointer to a member variable of class MR::FaceDistancesSettings named out. 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_FaceDistancesSettings_GetMutable_progress()

MRC_API MR_std_function_bool_from_float * MR_FaceDistancesSettings_GetMutable_progress ( MR_FaceDistancesSettings * _this)

for progress reporting and cancellation Returns a mutable pointer to a member variable of class MR::FaceDistancesSettings 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_FaceDistancesSettings_OffsetMutablePtr()

MRC_API MR_FaceDistancesSettings * MR_FaceDistancesSettings_OffsetMutablePtr ( MR_FaceDistancesSettings * 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_FaceDistancesSettings_OffsetPtr()

MRC_API const MR_FaceDistancesSettings * MR_FaceDistancesSettings_OffsetPtr ( const MR_FaceDistancesSettings * 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_FaceDistancesSettings_Set_maxDist()

MRC_API void MR_FaceDistancesSettings_Set_maxDist ( MR_FaceDistancesSettings * _this,
float * value )

optional output of the maximal distance to the most distant face Modifies a member variable of class MR::FaceDistancesSettings named maxDist. 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 maxDist. When this function is called, this object will drop object references it had previously in maxDist.

◆ MR_FaceDistancesSettings_Set_out()

MRC_API void MR_FaceDistancesSettings_Set_out ( MR_FaceDistancesSettings * _this,
MR_FaceDistancesSettings_OutputFaceValues value )

Modifies a member variable of class MR::FaceDistancesSettings named out. 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 out. When this function is called, this object will drop object references it had previously in out.

◆ MR_FaceDistancesSettings_Set_progress()

MRC_API void MR_FaceDistancesSettings_Set_progress ( MR_FaceDistancesSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_bool_from_float * value )

for progress reporting and cancellation Modifies a member variable of class MR::FaceDistancesSettings 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.