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

Go to the source code of this file.

Typedefs

typedef struct MR_expected_std_vector_MR_FaceBitSet_std_string MR_expected_std_vector_MR_FaceBitSet_std_string
typedef struct MR_std_vector_MR_VertBitSet MR_std_vector_MR_VertBitSet
typedef struct MR_CutAroundVertSetsParams MR_CutAroundVertSetsParams

Functions

MRC_API const float * MR_CutAroundVertSetsParams_Get_distance (const MR_CutAroundVertSetsParams *_this)
MRC_API void MR_CutAroundVertSetsParams_Set_distance (MR_CutAroundVertSetsParams *_this, float value)
MRC_API float * MR_CutAroundVertSetsParams_GetMutable_distance (MR_CutAroundVertSetsParams *_this)
MRC_API const float * MR_CutAroundVertSetsParams_Get_gap (const MR_CutAroundVertSetsParams *_this)
MRC_API void MR_CutAroundVertSetsParams_Set_gap (MR_CutAroundVertSetsParams *_this, float value)
MRC_API float * MR_CutAroundVertSetsParams_GetMutable_gap (MR_CutAroundVertSetsParams *_this)
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_DefaultConstruct (void)
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_DefaultConstructArray (size_t num_elems)
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_ConstructFrom (float distance, float gap)
MRC_API const MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_OffsetPtr (const MR_CutAroundVertSetsParams *ptr, ptrdiff_t i)
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_OffsetMutablePtr (MR_CutAroundVertSetsParams *ptr, ptrdiff_t i)
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_ConstructFromAnother (const MR_CutAroundVertSetsParams *_other)
MRC_API void MR_CutAroundVertSetsParams_Destroy (const MR_CutAroundVertSetsParams *_this)
 Destroys a heap-allocated instance of MR_CutAroundVertSetsParams. Does nothing if the pointer is null.
MRC_API void MR_CutAroundVertSetsParams_DestroyArray (const MR_CutAroundVertSetsParams *_this)
 Destroys a heap-allocated array of MR_CutAroundVertSetsParams. Does nothing if the pointer is null.
MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_AssignFromAnother (MR_CutAroundVertSetsParams *_this, const MR_CutAroundVertSetsParams *_other)
MRC_API MR_expected_std_vector_MR_FaceBitSet_std_string * MR_cutAroundVertSets (MR_Mesh *mesh, const MR_std_vector_MR_VertBitSet *vertSets, const MR_CutAroundVertSetsParams *params, const MR_std_function_bool_from_float *cb)

Typedef Documentation

◆ MR_CutAroundVertSetsParams

Generated from class MR::CutAroundVertSetsParams. 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_expected_std_vector_MR_FaceBitSet_std_string

Stores either a std::vector<MR::FaceBitSet> that represents success or a std::string that represents an error. 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_vector_MR_VertBitSet

Generated from C++ container std::vector<MR::VertBitSet>. 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_cutAroundVertSets()

computes surface distance field around each vertex set up to (distance + gap), scales any two fields to be separated by gap, and cuts the mesh along isolines of each field at given distance; no two vertex sets may share a vertex; edges with both ends in one set are not cut and keep their ids;

Returns
the region of each vertex set (triangles with distance <= params.distance) in the modified mesh Generated from function MR::cutAroundVertSets. Parameter mesh can not be null. It is a single object. Parameter vertSets can not be null. It is a single object. Parameter params 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_expected_std_vector_MR_FaceBitSet_std_string_Destroy() to free it when you're done using it.

◆ MR_CutAroundVertSetsParams_AssignFromAnother()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_AssignFromAnother ( MR_CutAroundVertSetsParams * _this,
const MR_CutAroundVertSetsParams * _other )

Generated from method MR::CutAroundVertSetsParams::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_CutAroundVertSetsParams_ConstructFrom()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_ConstructFrom ( float distance,
float gap )

Constructs MR::CutAroundVertSetsParams elementwise. Never returns null. Returns an instance allocated on the heap! Must call MR_CutAroundVertSetsParams_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_CutAroundVertSetsParams_ConstructFromAnother()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_ConstructFromAnother ( const MR_CutAroundVertSetsParams * _other)

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

◆ MR_CutAroundVertSetsParams_DefaultConstruct()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_DefaultConstruct ( void )

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

◆ MR_CutAroundVertSetsParams_DefaultConstructArray()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_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_CutAroundVertSetsParams_DestroyArray(). Use MR_CutAroundVertSetsParams_OffsetMutablePtr() and MR_CutAroundVertSetsParams_OffsetPtr() to access the array elements.

◆ MR_CutAroundVertSetsParams_Destroy()

MRC_API void MR_CutAroundVertSetsParams_Destroy ( const MR_CutAroundVertSetsParams * _this)

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

◆ MR_CutAroundVertSetsParams_DestroyArray()

MRC_API void MR_CutAroundVertSetsParams_DestroyArray ( const MR_CutAroundVertSetsParams * _this)

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

◆ MR_CutAroundVertSetsParams_Get_distance()

MRC_API const float * MR_CutAroundVertSetsParams_Get_distance ( const MR_CutAroundVertSetsParams * _this)

the mesh is cut along the isolines of surface distance equal to this value around each vertex set Returns a pointer to a member variable of class MR::CutAroundVertSetsParams 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. The reference to this object might be preserved as the return value.

◆ MR_CutAroundVertSetsParams_Get_gap()

MRC_API const float * MR_CutAroundVertSetsParams_Get_gap ( const MR_CutAroundVertSetsParams * _this)

keeps the regions of any two vertex sets from overlapping, even if the sets are closer than (2*distance + gap): in the vertices where the sum of two distance fields is less than (2*distance + gap), both values are scaled proportionally to make the sum exactly (2*distance + gap); so the gap is exact in the scaled fields, and the surface gap between two regions is about gap * setsDistance / (2*distance + gap); must be positive, otherwise the isolines of two close sets coincide Returns a pointer to a member variable of class MR::CutAroundVertSetsParams named gap. 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_CutAroundVertSetsParams_GetMutable_distance()

MRC_API float * MR_CutAroundVertSetsParams_GetMutable_distance ( MR_CutAroundVertSetsParams * _this)

the mesh is cut along the isolines of surface distance equal to this value around each vertex set Returns a mutable pointer to a member variable of class MR::CutAroundVertSetsParams 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. The reference to this object might be preserved as the return value.

◆ MR_CutAroundVertSetsParams_GetMutable_gap()

MRC_API float * MR_CutAroundVertSetsParams_GetMutable_gap ( MR_CutAroundVertSetsParams * _this)

keeps the regions of any two vertex sets from overlapping, even if the sets are closer than (2*distance + gap): in the vertices where the sum of two distance fields is less than (2*distance + gap), both values are scaled proportionally to make the sum exactly (2*distance + gap); so the gap is exact in the scaled fields, and the surface gap between two regions is about gap * setsDistance / (2*distance + gap); must be positive, otherwise the isolines of two close sets coincide Returns a mutable pointer to a member variable of class MR::CutAroundVertSetsParams named gap. 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_CutAroundVertSetsParams_OffsetMutablePtr()

MRC_API MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_OffsetMutablePtr ( MR_CutAroundVertSetsParams * 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_CutAroundVertSetsParams_OffsetPtr()

MRC_API const MR_CutAroundVertSetsParams * MR_CutAroundVertSetsParams_OffsetPtr ( const MR_CutAroundVertSetsParams * 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_CutAroundVertSetsParams_Set_distance()

MRC_API void MR_CutAroundVertSetsParams_Set_distance ( MR_CutAroundVertSetsParams * _this,
float value )

the mesh is cut along the isolines of surface distance equal to this value around each vertex set Modifies a member variable of class MR::CutAroundVertSetsParams 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 held previously in distance.

◆ MR_CutAroundVertSetsParams_Set_gap()

MRC_API void MR_CutAroundVertSetsParams_Set_gap ( MR_CutAroundVertSetsParams * _this,
float value )

keeps the regions of any two vertex sets from overlapping, even if the sets are closer than (2*distance + gap): in the vertices where the sum of two distance fields is less than (2*distance + gap), both values are scaled proportionally to make the sum exactly (2*distance + gap); so the gap is exact in the scaled fields, and the surface gap between two regions is about gap * setsDistance / (2*distance + gap); must be positive, otherwise the isolines of two close sets coincide Modifies a member variable of class MR::CutAroundVertSetsParams named gap. 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 gap.