MeshLib C Docs
Loading...
Searching...
No Matches
MRSurfaceDistanceBuilder.h File Reference
#include <MRCMesh/MRId.h>
#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_Mesh MR_Mesh
 
typedef struct MR_MeshTriPoint MR_MeshTriPoint
 
typedef struct MR_Vector3f MR_Vector3f
 
typedef struct MR_VertBitSet MR_VertBitSet
 
typedef struct MR_VertScalars MR_VertScalars
 
typedef struct MR_phmap_flat_hash_map_MR_VertId_float MR_phmap_flat_hash_map_MR_VertId_float
 
typedef struct MR_VertDistance MR_VertDistance
 
typedef struct MR_SurfaceDistanceBuilder MR_SurfaceDistanceBuilder
 

Functions

MRC_API const MR_VertIdMR_VertDistance_Get_vert (const MR_VertDistance *_this)
 
MRC_API void MR_VertDistance_Set_vert (MR_VertDistance *_this, MR_VertId value)
 
MRC_API MR_VertIdMR_VertDistance_GetMutable_vert (MR_VertDistance *_this)
 
MRC_API const float * MR_VertDistance_Get_distance (const MR_VertDistance *_this)
 
MRC_API void MR_VertDistance_Set_distance (MR_VertDistance *_this, float value)
 
MRC_API float * MR_VertDistance_GetMutable_distance (MR_VertDistance *_this)
 
MRC_API MR_VertDistanceMR_VertDistance_DefaultConstruct (void)
 
MRC_API MR_VertDistanceMR_VertDistance_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_VertDistanceMR_VertDistance_OffsetPtr (const MR_VertDistance *ptr, ptrdiff_t i)
 
MRC_API MR_VertDistanceMR_VertDistance_OffsetMutablePtr (MR_VertDistance *ptr, ptrdiff_t i)
 
MRC_API MR_VertDistanceMR_VertDistance_ConstructFromAnother (const MR_VertDistance *_other)
 
MRC_API MR_VertDistanceMR_VertDistance_Construct (MR_VertId v, float d)
 
MRC_API void MR_VertDistance_Destroy (const MR_VertDistance *_this)
 Destroys a heap-allocated instance of MR_VertDistance. Does nothing if the pointer is null.
 
MRC_API void MR_VertDistance_DestroyArray (const MR_VertDistance *_this)
 Destroys a heap-allocated array of MR_VertDistance. Does nothing if the pointer is null.
 
MRC_API MR_VertDistanceMR_VertDistance_AssignFromAnother (MR_VertDistance *_this, const MR_VertDistance *_other)
 
MRC_API bool MR_less_MR_VertDistance (const MR_VertDistance *a, const MR_VertDistance *b)
 
MRC_API MR_SurfaceDistanceBuilderMR_SurfaceDistanceBuilder_ConstructFromAnother (MR_PassBy _other_pass_by, MR_SurfaceDistanceBuilder *_other)
 
MRC_API const MR_SurfaceDistanceBuilderMR_SurfaceDistanceBuilder_OffsetPtr (const MR_SurfaceDistanceBuilder *ptr, ptrdiff_t i)
 
MRC_API MR_SurfaceDistanceBuilderMR_SurfaceDistanceBuilder_OffsetMutablePtr (MR_SurfaceDistanceBuilder *ptr, ptrdiff_t i)
 
MRC_API MR_SurfaceDistanceBuilderMR_SurfaceDistanceBuilder_Construct_2 (const MR_Mesh *mesh, const MR_VertBitSet *region)
 
MRC_API MR_SurfaceDistanceBuilderMR_SurfaceDistanceBuilder_Construct_3 (const MR_Mesh *mesh, const MR_Vector3f *target, const MR_VertBitSet *region)
 
MRC_API void MR_SurfaceDistanceBuilder_Destroy (const MR_SurfaceDistanceBuilder *_this)
 Destroys a heap-allocated instance of MR_SurfaceDistanceBuilder. Does nothing if the pointer is null.
 
MRC_API void MR_SurfaceDistanceBuilder_DestroyArray (const MR_SurfaceDistanceBuilder *_this)
 Destroys a heap-allocated array of MR_SurfaceDistanceBuilder. Does nothing if the pointer is null.
 
MRC_API void MR_SurfaceDistanceBuilder_addStartRegion (MR_SurfaceDistanceBuilder *_this, const MR_VertBitSet *region, float startDistance)
 
MRC_API void MR_SurfaceDistanceBuilder_addStartVertices (MR_SurfaceDistanceBuilder *_this, const MR_phmap_flat_hash_map_MR_VertId_float *startVertices)
 
MRC_API void MR_SurfaceDistanceBuilder_addStart (MR_SurfaceDistanceBuilder *_this, const MR_MeshTriPoint *start)
 
MRC_API void MR_SurfaceDistanceBuilder_setMaxVertUpdates (MR_SurfaceDistanceBuilder *_this, int v)
 
MRC_API MR_VertId MR_SurfaceDistanceBuilder_growOne (MR_SurfaceDistanceBuilder *_this)
 
MRC_API MR_VertScalarsMR_SurfaceDistanceBuilder_takeDistanceMap (MR_SurfaceDistanceBuilder *_this)
 
MRC_API bool MR_SurfaceDistanceBuilder_done (const MR_SurfaceDistanceBuilder *_this)
 
MRC_API float MR_SurfaceDistanceBuilder_doneDistance (const MR_SurfaceDistanceBuilder *_this)
 

Typedef Documentation

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_MeshTriPoint

◆ MR_phmap_flat_hash_map_MR_VertId_float

◆ MR_SurfaceDistanceBuilder

this class is responsible for iterative construction of distance map along the surface Generated from class MR::SurfaceDistanceBuilder. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_Vector3f

typedef struct MR_Vector3f MR_Vector3f

◆ MR_VertBitSet

typedef struct MR_VertBitSet MR_VertBitSet

◆ MR_VertDistance

Generated from class MR::VertDistance. 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_VertScalars

Function Documentation

◆ MR_less_MR_VertDistance()

MRC_API bool MR_less_MR_VertDistance ( const MR_VertDistance * a,
const MR_VertDistance * b )

smaller distance to be the first Generated from function MR::operator<. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_addStart()

MRC_API void MR_SurfaceDistanceBuilder_addStart ( MR_SurfaceDistanceBuilder * _this,
const MR_MeshTriPoint * start )

initiates distance construction from triangle vertices surrounding given start point (they all will be returned by growOne) Generated from method MR::SurfaceDistanceBuilder::addStart. Parameter _this can not be null. It is a single object. Parameter start can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_addStartRegion()

MRC_API void MR_SurfaceDistanceBuilder_addStartRegion ( MR_SurfaceDistanceBuilder * _this,
const MR_VertBitSet * region,
float startDistance )

initiates distance construction from given vertices with known start distance in all of them (region vertices will NOT be returned by growOne) Generated from method MR::SurfaceDistanceBuilder::addStartRegion. Parameter _this can not be null. It is a single object. Parameter region can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_addStartVertices()

MRC_API void MR_SurfaceDistanceBuilder_addStartVertices ( MR_SurfaceDistanceBuilder * _this,
const MR_phmap_flat_hash_map_MR_VertId_float * startVertices )

initiates distance construction from given start vertices with values in them (these vertices will NOT be returned by growOne if values in them are not decreased) Generated from method MR::SurfaceDistanceBuilder::addStartVertices. Parameter _this can not be null. It is a single object. Parameter startVertices can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_Construct_2()

MRC_API MR_SurfaceDistanceBuilder * MR_SurfaceDistanceBuilder_Construct_2 ( const MR_Mesh * mesh,
const MR_VertBitSet * region )

Generated from constructor MR::SurfaceDistanceBuilder::SurfaceDistanceBuilder. Parameter mesh can not be null. It is a single object. The reference to the parameter mesh might be preserved in the constructed object. The reference to the parameter region might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_SurfaceDistanceBuilder_Destroy() to free it when you're done using it.

◆ MR_SurfaceDistanceBuilder_Construct_3()

MRC_API MR_SurfaceDistanceBuilder * MR_SurfaceDistanceBuilder_Construct_3 ( const MR_Mesh * mesh,
const MR_Vector3f * target,
const MR_VertBitSet * region )

Generated from constructor MR::SurfaceDistanceBuilder::SurfaceDistanceBuilder. Parameter mesh can not be null. It is a single object. The reference to the parameter mesh might be preserved in the constructed object. Parameter target can not be null. It is a single object. The reference to the parameter target might be preserved in the constructed object. The reference to the parameter region might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_SurfaceDistanceBuilder_Destroy() to free it when you're done using it.

◆ MR_SurfaceDistanceBuilder_ConstructFromAnother()

MRC_API MR_SurfaceDistanceBuilder * MR_SurfaceDistanceBuilder_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_SurfaceDistanceBuilder * _other )

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

◆ MR_SurfaceDistanceBuilder_Destroy()

MRC_API void MR_SurfaceDistanceBuilder_Destroy ( const MR_SurfaceDistanceBuilder * _this)

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

◆ MR_SurfaceDistanceBuilder_DestroyArray()

MRC_API void MR_SurfaceDistanceBuilder_DestroyArray ( const MR_SurfaceDistanceBuilder * _this)

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

◆ MR_SurfaceDistanceBuilder_done()

MRC_API bool MR_SurfaceDistanceBuilder_done ( const MR_SurfaceDistanceBuilder * _this)

returns true if further growth is impossible Generated from method MR::SurfaceDistanceBuilder::done. Parameter _this can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_doneDistance()

MRC_API float MR_SurfaceDistanceBuilder_doneDistance ( const MR_SurfaceDistanceBuilder * _this)

returns path length till the next candidate vertex or maximum float value if all vertices have been reached Generated from method MR::SurfaceDistanceBuilder::doneDistance. Parameter _this can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_growOne()

MRC_API MR_VertId MR_SurfaceDistanceBuilder_growOne ( MR_SurfaceDistanceBuilder * _this)

processes one more candidate vertex, which is returned Generated from method MR::SurfaceDistanceBuilder::growOne. Parameter _this can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_OffsetMutablePtr()

MRC_API MR_SurfaceDistanceBuilder * MR_SurfaceDistanceBuilder_OffsetMutablePtr ( MR_SurfaceDistanceBuilder * 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_SurfaceDistanceBuilder_OffsetPtr()

MRC_API const MR_SurfaceDistanceBuilder * MR_SurfaceDistanceBuilder_OffsetPtr ( const MR_SurfaceDistanceBuilder * 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_SurfaceDistanceBuilder_setMaxVertUpdates()

MRC_API void MR_SurfaceDistanceBuilder_setMaxVertUpdates ( MR_SurfaceDistanceBuilder * _this,
int v )

the maximum amount of times vertex distance can be updated in [1,255], 3 by default; the more the better obtuse triangles are handled Generated from method MR::SurfaceDistanceBuilder::setMaxVertUpdates. Parameter _this can not be null. It is a single object.

◆ MR_SurfaceDistanceBuilder_takeDistanceMap()

MRC_API MR_VertScalars * MR_SurfaceDistanceBuilder_takeDistanceMap ( MR_SurfaceDistanceBuilder * _this)

takes ownership over constructed distance map Generated from method MR::SurfaceDistanceBuilder::takeDistanceMap. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertScalars_Destroy() to free it when you're done using it.

◆ MR_VertDistance_AssignFromAnother()

MRC_API MR_VertDistance * MR_VertDistance_AssignFromAnother ( MR_VertDistance * _this,
const MR_VertDistance * _other )

Generated from method MR::VertDistance::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 had previously.

◆ MR_VertDistance_Construct()

MRC_API MR_VertDistance * MR_VertDistance_Construct ( MR_VertId v,
float d )

Generated from constructor MR::VertDistance::VertDistance. The reference to the parameter v might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertDistance_Destroy() to free it when you're done using it.

◆ MR_VertDistance_ConstructFromAnother()

MRC_API MR_VertDistance * MR_VertDistance_ConstructFromAnother ( const MR_VertDistance * _other)

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

◆ MR_VertDistance_DefaultConstruct()

MRC_API MR_VertDistance * MR_VertDistance_DefaultConstruct ( void )

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

◆ MR_VertDistance_DefaultConstructArray()

MRC_API MR_VertDistance * MR_VertDistance_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_VertDistance_DestroyArray(). Use MR_VertDistance_OffsetMutablePtr() and MR_VertDistance_OffsetPtr() to access the array elements.

◆ MR_VertDistance_Destroy()

MRC_API void MR_VertDistance_Destroy ( const MR_VertDistance * _this)

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

◆ MR_VertDistance_DestroyArray()

MRC_API void MR_VertDistance_DestroyArray ( const MR_VertDistance * _this)

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

◆ MR_VertDistance_Get_distance()

MRC_API const float * MR_VertDistance_Get_distance ( const MR_VertDistance * _this)

best known distance to reach this vertex Returns a pointer to a member variable of class MR::VertDistance 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_VertDistance_Get_vert()

MRC_API const MR_VertId * MR_VertDistance_Get_vert ( const MR_VertDistance * _this)

vertex in question Returns a pointer to a member variable of class MR::VertDistance named vert. 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_VertDistance_GetMutable_distance()

MRC_API float * MR_VertDistance_GetMutable_distance ( MR_VertDistance * _this)

best known distance to reach this vertex Returns a mutable pointer to a member variable of class MR::VertDistance 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_VertDistance_GetMutable_vert()

MRC_API MR_VertId * MR_VertDistance_GetMutable_vert ( MR_VertDistance * _this)

vertex in question Returns a mutable pointer to a member variable of class MR::VertDistance named vert. 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_VertDistance_OffsetMutablePtr()

MRC_API MR_VertDistance * MR_VertDistance_OffsetMutablePtr ( MR_VertDistance * 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_VertDistance_OffsetPtr()

MRC_API const MR_VertDistance * MR_VertDistance_OffsetPtr ( const MR_VertDistance * 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_VertDistance_Set_distance()

MRC_API void MR_VertDistance_Set_distance ( MR_VertDistance * _this,
float value )

best known distance to reach this vertex Modifies a member variable of class MR::VertDistance 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_VertDistance_Set_vert()

MRC_API void MR_VertDistance_Set_vert ( MR_VertDistance * _this,
MR_VertId value )

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