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

Go to the source code of this file.

Typedefs

typedef struct MR_std_function_float_from_MR_EdgeId MR_std_function_float_from_MR_EdgeId
typedef struct MR_DihedralAngleProcessParams MR_DihedralAngleProcessParams

Functions

MRC_API MR_std_function_float_from_MR_EdgeIdMR_identityMetric (void)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeLengthMetric_1 (const MR_Mesh *mesh)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeLengthMetric_2 (const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_discreteAbsMeanCurvatureMetric_1 (const MR_Mesh *mesh)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_discreteAbsMeanCurvatureMetric_2 (const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_discreteMinusAbsMeanCurvatureMetric_1 (const MR_Mesh *mesh)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_discreteMinusAbsMeanCurvatureMetric_2 (const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeCurvMetric_3 (const MR_Mesh *mesh, const float *angleSinFactor, const float *angleSinForBoundary)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeCurvMetric_4 (const MR_MeshTopology *topology, const MR_VertCoords *points, const float *angleSinFactor, const float *angleSinForBoundary)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeAbsCurvMetric_3 (const MR_Mesh *mesh, const float *angleSinFactor, const float *angleSinForBoundary)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeAbsCurvMetric_4 (const MR_MeshTopology *topology, const MR_VertCoords *points, const float *angleSinFactor, const float *angleSinForBoundary)
MRC_API const float * MR_DihedralAngleProcessParams_Get_convexFactor (const MR_DihedralAngleProcessParams *_this)
MRC_API void MR_DihedralAngleProcessParams_Set_convexFactor (MR_DihedralAngleProcessParams *_this, float value)
MRC_API float * MR_DihedralAngleProcessParams_GetMutable_convexFactor (MR_DihedralAngleProcessParams *_this)
MRC_API const float * MR_DihedralAngleProcessParams_Get_concaveFactor (const MR_DihedralAngleProcessParams *_this)
MRC_API void MR_DihedralAngleProcessParams_Set_concaveFactor (MR_DihedralAngleProcessParams *_this, float value)
MRC_API float * MR_DihedralAngleProcessParams_GetMutable_concaveFactor (MR_DihedralAngleProcessParams *_this)
MRC_API const float * MR_DihedralAngleProcessParams_Get_boundaryValue (const MR_DihedralAngleProcessParams *_this)
MRC_API void MR_DihedralAngleProcessParams_Set_boundaryValue (MR_DihedralAngleProcessParams *_this, float value)
MRC_API float * MR_DihedralAngleProcessParams_GetMutable_boundaryValue (MR_DihedralAngleProcessParams *_this)
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_DefaultConstruct (void)
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_DefaultConstructArray (size_t num_elems)
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_ConstructFrom (float convexFactor, float concaveFactor, float boundaryValue)
MRC_API const MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_OffsetPtr (const MR_DihedralAngleProcessParams *ptr, ptrdiff_t i)
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_OffsetMutablePtr (MR_DihedralAngleProcessParams *ptr, ptrdiff_t i)
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_ConstructFromAnother (const MR_DihedralAngleProcessParams *_other)
MRC_API void MR_DihedralAngleProcessParams_Destroy (const MR_DihedralAngleProcessParams *_this)
 Destroys a heap-allocated instance of MR_DihedralAngleProcessParams. Does nothing if the pointer is null.
MRC_API void MR_DihedralAngleProcessParams_DestroyArray (const MR_DihedralAngleProcessParams *_this)
 Destroys a heap-allocated array of MR_DihedralAngleProcessParams. Does nothing if the pointer is null.
MRC_API MR_DihedralAngleProcessParamsMR_DihedralAngleProcessParams_AssignFromAnother (MR_DihedralAngleProcessParams *_this, const MR_DihedralAngleProcessParams *_other)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeDihedralAngleMetric_2 (const MR_Mesh *mesh, const MR_DihedralAngleProcessParams *params)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeDihedralAngleMetric_3 (const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_DihedralAngleProcessParams *params)
MRC_API MR_std_function_float_from_MR_EdgeIdMR_edgeTableSymMetric (const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric)

Typedef Documentation

◆ MR_DihedralAngleProcessParams

Generated from class MR::DihedralAngleProcessParams. 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_std_function_float_from_MR_EdgeId

Stores a functor of type: float(MR::EdgeId). Possibly stateful. 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).

Function Documentation

◆ MR_DihedralAngleProcessParams_AssignFromAnother()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_AssignFromAnother ( MR_DihedralAngleProcessParams * _this,
const MR_DihedralAngleProcessParams * _other )

Generated from method MR::DihedralAngleProcessParams::operator=. Parameter _this can not be null. It is a single object. Parameter _other 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 held previously.

◆ MR_DihedralAngleProcessParams_ConstructFrom()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_ConstructFrom ( float convexFactor,
float concaveFactor,
float boundaryValue )

Constructs MR::DihedralAngleProcessParams elementwise. Never returns null. Returns an instance allocated on the heap! Must call MR_DihedralAngleProcessParams_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it held previously.

◆ MR_DihedralAngleProcessParams_ConstructFromAnother()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_ConstructFromAnother ( const MR_DihedralAngleProcessParams * _other)

Generated from constructor MR::DihedralAngleProcessParams::DihedralAngleProcessParams. Parameter _other 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 the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_DihedralAngleProcessParams_Destroy() to free it when you're done using it.

◆ MR_DihedralAngleProcessParams_DefaultConstruct()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_DefaultConstruct ( void )

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

◆ MR_DihedralAngleProcessParams_DefaultConstructArray()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_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_DihedralAngleProcessParams_DestroyArray(). Use MR_DihedralAngleProcessParams_OffsetMutablePtr() and MR_DihedralAngleProcessParams_OffsetPtr() to access the array elements.

◆ MR_DihedralAngleProcessParams_Destroy()

MRC_API void MR_DihedralAngleProcessParams_Destroy ( const MR_DihedralAngleProcessParams * _this)

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

◆ MR_DihedralAngleProcessParams_DestroyArray()

MRC_API void MR_DihedralAngleProcessParams_DestroyArray ( const MR_DihedralAngleProcessParams * _this)

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

◆ MR_DihedralAngleProcessParams_Get_boundaryValue()

MRC_API const float * MR_DihedralAngleProcessParams_Get_boundaryValue ( const MR_DihedralAngleProcessParams * _this)

this value will be returned as dihedral angle for boundary edges Modifies a member variable of class MR::DihedralAngleProcessParams named boundaryValue. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it held previously in boundaryValue.

◆ MR_DihedralAngleProcessParams_Get_concaveFactor()

MRC_API const float * MR_DihedralAngleProcessParams_Get_concaveFactor ( const MR_DihedralAngleProcessParams * _this)

negative concave dihedral angles are returned multiplied on this factor Modifies a member variable of class MR::DihedralAngleProcessParams named concaveFactor. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it held previously in concaveFactor.

◆ MR_DihedralAngleProcessParams_Get_convexFactor()

MRC_API const float * MR_DihedralAngleProcessParams_Get_convexFactor ( const MR_DihedralAngleProcessParams * _this)

positive convex dihedral angles are returned multiplied on this factor Modifies a member variable of class MR::DihedralAngleProcessParams named convexFactor. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it held previously in convexFactor.

◆ MR_DihedralAngleProcessParams_GetMutable_boundaryValue()

MRC_API float * MR_DihedralAngleProcessParams_GetMutable_boundaryValue ( MR_DihedralAngleProcessParams * _this)

◆ MR_DihedralAngleProcessParams_GetMutable_concaveFactor()

MRC_API float * MR_DihedralAngleProcessParams_GetMutable_concaveFactor ( MR_DihedralAngleProcessParams * _this)

this value will be returned as dihedral angle for boundary edges Returns a pointer to a member variable of class MR::DihedralAngleProcessParams named boundaryValue. 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. The reference to this object might be preserved as the return value.

◆ MR_DihedralAngleProcessParams_GetMutable_convexFactor()

MRC_API float * MR_DihedralAngleProcessParams_GetMutable_convexFactor ( MR_DihedralAngleProcessParams * _this)

negative concave dihedral angles are returned multiplied on this factor Returns a pointer to a member variable of class MR::DihedralAngleProcessParams named concaveFactor. 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. The reference to this object might be preserved as the return value.

◆ MR_DihedralAngleProcessParams_OffsetMutablePtr()

MRC_API MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_OffsetMutablePtr ( MR_DihedralAngleProcessParams * 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_DihedralAngleProcessParams_OffsetPtr()

MRC_API const MR_DihedralAngleProcessParams * MR_DihedralAngleProcessParams_OffsetPtr ( const MR_DihedralAngleProcessParams * 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_DihedralAngleProcessParams_Set_boundaryValue()

MRC_API void MR_DihedralAngleProcessParams_Set_boundaryValue ( MR_DihedralAngleProcessParams * _this,
float value )

this value will be returned as dihedral angle for boundary edges Returns a mutable pointer to a member variable of class MR::DihedralAngleProcessParams named boundaryValue. 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. The reference to this object might be preserved as the return value.

◆ MR_DihedralAngleProcessParams_Set_concaveFactor()

MRC_API void MR_DihedralAngleProcessParams_Set_concaveFactor ( MR_DihedralAngleProcessParams * _this,
float value )

negative concave dihedral angles are returned multiplied on this factor Returns a mutable pointer to a member variable of class MR::DihedralAngleProcessParams named concaveFactor. 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. The reference to this object might be preserved as the return value.

◆ MR_DihedralAngleProcessParams_Set_convexFactor()

MRC_API void MR_DihedralAngleProcessParams_Set_convexFactor ( MR_DihedralAngleProcessParams * _this,
float value )

positive convex dihedral angles are returned multiplied on this factor Returns a mutable pointer to a member variable of class MR::DihedralAngleProcessParams named convexFactor. 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. The reference to this object might be preserved as the return value.

◆ MR_discreteAbsMeanCurvatureMetric_1()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_discreteAbsMeanCurvatureMetric_1 ( const MR_Mesh * mesh)

returns edge's absolute discrete mean curvature as a metric; the metric is minimal in the planar regions of mesh; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::discreteAbsMeanCurvatureMetric. Parameter mesh can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_discreteAbsMeanCurvatureMetric_2()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_discreteAbsMeanCurvatureMetric_2 ( const MR_MeshTopology * topology,
const MR_VertCoords * points )

Generated from function MR::discreteAbsMeanCurvatureMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_discreteMinusAbsMeanCurvatureMetric_1()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_discreteMinusAbsMeanCurvatureMetric_1 ( const MR_Mesh * mesh)

returns minus of edge's absolute discrete mean curvature as a metric; the metric is minimal in the most curved regions of mesh; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::discreteMinusAbsMeanCurvatureMetric. Parameter mesh can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_discreteMinusAbsMeanCurvatureMetric_2()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_discreteMinusAbsMeanCurvatureMetric_2 ( const MR_MeshTopology * topology,
const MR_VertCoords * points )

Generated from function MR::discreteMinusAbsMeanCurvatureMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeAbsCurvMetric_3()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeAbsCurvMetric_3 ( const MR_Mesh * mesh,
const float * angleSinFactor,
const float * angleSinForBoundary )

not-negative metric that depends both on edge's length and on the angle between its left and right faces (ignoring the different between convex and concave)

Parameters
angleSinFactormultiplier before absolute value of dihedral angle sine in edge metric calculation: zero - planar case, larger values of (PI - dihedral angle)
angleSinForBoundaryconsider this dihedral angle sine for boundary edges; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::edgeAbsCurvMetric. Parameter mesh can not be null. It is a single object. Parameter angleSinFactor has a default argument: 2, pass a null pointer to use it. Parameter angleSinForBoundary has a default argument: 0, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeAbsCurvMetric_4()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeAbsCurvMetric_4 ( const MR_MeshTopology * topology,
const MR_VertCoords * points,
const float * angleSinFactor,
const float * angleSinForBoundary )

Generated from function MR::edgeAbsCurvMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Parameter angleSinFactor has a default argument: 2, pass a null pointer to use it. Parameter angleSinForBoundary has a default argument: 0, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it. positive convex dihedral angles are returned multiplied on this factor Returns a pointer to a member variable of class MR::DihedralAngleProcessParams named convexFactor. 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. The reference to this object might be preserved as the return value.

◆ MR_edgeCurvMetric_3()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeCurvMetric_3 ( const MR_Mesh * mesh,
const float * angleSinFactor,
const float * angleSinForBoundary )

not-negative metric that depends both on edge's length and on the angle between its left and right faces

Parameters
angleSinFactormultiplier before dihedral angle sine in edge metric calculation (positive to prefer concave angles, negative - convex)
angleSinForBoundaryconsider this dihedral angle sine for boundary edges; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::edgeCurvMetric. Parameter mesh can not be null. It is a single object. Parameter angleSinFactor has a default argument: 2, pass a null pointer to use it. Parameter angleSinForBoundary has a default argument: 0, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeCurvMetric_4()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeCurvMetric_4 ( const MR_MeshTopology * topology,
const MR_VertCoords * points,
const float * angleSinFactor,
const float * angleSinForBoundary )

Generated from function MR::edgeCurvMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Parameter angleSinFactor has a default argument: 2, pass a null pointer to use it. Parameter angleSinForBoundary has a default argument: 0, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeDihedralAngleMetric_2()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeDihedralAngleMetric_2 ( const MR_Mesh * mesh,
const MR_DihedralAngleProcessParams * params )

this metric returns edge's dihedral angle computed by MR::dihedralAngle and post-processed based on the given parameters; returned value is NOT multiplied on edge's length as in other metrics; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::edgeDihedralAngleMetric. Parameter mesh can not be null. It is a single object. Parameter params is a single object. Parameter params 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_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeDihedralAngleMetric_3()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeDihedralAngleMetric_3 ( const MR_MeshTopology * topology,
const MR_VertCoords * points,
const MR_DihedralAngleProcessParams * params )

Generated from function MR::edgeDihedralAngleMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Parameter params is a single object. Parameter params 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_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeLengthMetric_1()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeLengthMetric_1 ( const MR_Mesh * mesh)

returns edge's length as a metric; this metric is symmetric: m(e) == m(e.sym()) Generated from function MR::edgeLengthMetric. Parameter mesh can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeLengthMetric_2()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeLengthMetric_2 ( const MR_MeshTopology * topology,
const MR_VertCoords * points )

Generated from function MR::edgeLengthMetric. Parameter topology can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_edgeTableSymMetric()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_edgeTableSymMetric ( const MR_MeshTopology * topology,
const MR_std_function_float_from_MR_EdgeId * metric )

pre-computes the metric for all mesh edges to quickly return it later for any edge; input metric must be symmetric: metric(e) == metric(e.sym()) Generated from function MR::edgeTableSymMetric. Parameter topology can not be null. It is a single object. Parameter metric can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_identityMetric()

MRC_API MR_std_function_float_from_MR_EdgeId * MR_identityMetric ( void )

metric returning 1 for every edge Generated from function MR::identityMetric. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_MR_EdgeId_Destroy() to free it when you're done using it.