MeshLib C Docs
Loading...
Searching...
No Matches
MRPolylineTopology.h File Reference
#include <MRCMesh/MRId.h>
#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_EdgeMap MR_EdgeMap
 
typedef struct MR_Edges MR_Edges
 
typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
 
typedef struct MR_Vector_MR_EdgeId_MR_VertId MR_Vector_MR_EdgeId_MR_VertId
 
typedef struct MR_Vector_MR_VertId_MR_EdgeId MR_Vector_MR_VertId_MR_EdgeId
 
typedef struct MR_VertBitSet MR_VertBitSet
 
typedef struct MR_VertMap MR_VertMap
 
typedef struct MR_WholeEdgeMap MR_WholeEdgeMap
 
typedef struct MR_std_istream MR_std_istream
 
typedef struct MR_std_ostream MR_std_ostream
 
typedef struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId
 
typedef struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId
 
typedef struct MR_PolylineTopology MR_PolylineTopology
 
typedef struct MR_PolylineMaker MR_PolylineMaker
 

Functions

MRC_API MR_PolylineTopologyMR_PolylineTopology_DefaultConstruct (void)
 
MRC_API MR_PolylineTopologyMR_PolylineTopology_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_PolylineTopologyMR_PolylineTopology_OffsetPtr (const MR_PolylineTopology *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_PolylineTopologyMR_PolylineTopology_OffsetMutablePtr (MR_PolylineTopology *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_PolylineTopologyMR_PolylineTopology_ConstructFromAnother (MR_PassBy _other_pass_by, MR_PolylineTopology *_other)
 
MRC_API void MR_PolylineTopology_Destroy (const MR_PolylineTopology *_this)
 Destroys a heap-allocated instance of MR_PolylineTopology. Does nothing if the pointer is null.
 
MRC_API void MR_PolylineTopology_DestroyArray (const MR_PolylineTopology *_this)
 Destroys a heap-allocated array of MR_PolylineTopology. Does nothing if the pointer is null.
 
MRC_API MR_PolylineTopologyMR_PolylineTopology_AssignFromAnother (MR_PolylineTopology *_this, MR_PassBy _other_pass_by, MR_PolylineTopology *_other)
 
MRC_API void MR_PolylineTopology_buildOpenLines (MR_PolylineTopology *_this, const MR_std_vector_MR_VertId *comp2firstVert)
 
MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_0 (MR_PolylineTopology *_this)
 
MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_3 (MR_PolylineTopology *_this, MR_VertId a, MR_VertId b, const MR_EdgeId *e)
 
MRC_API int32_t MR_PolylineTopology_makeEdges (MR_PolylineTopology *_this, const MR_Edges *edges)
 
MRC_API bool MR_PolylineTopology_isLoneEdge (const MR_PolylineTopology *_this, MR_EdgeId a)
 
MRC_API MR_UndirectedEdgeId MR_PolylineTopology_lastNotLoneUndirectedEdge (const MR_PolylineTopology *_this)
 
MRC_API MR_EdgeId MR_PolylineTopology_lastNotLoneEdge (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_edgeSize (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_edgeCapacity (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeSize (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeCapacity (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_computeNotLoneUndirectedEdges (const MR_PolylineTopology *_this)
 
MRC_API void MR_PolylineTopology_edgeReserve (MR_PolylineTopology *_this, MR_uint64_t newCapacity)
 
MRC_API bool MR_PolylineTopology_hasEdge (const MR_PolylineTopology *_this, MR_EdgeId e)
 
MRC_API void MR_PolylineTopology_deleteEdge (MR_PolylineTopology *_this, MR_UndirectedEdgeId ue)
 
MRC_API void MR_PolylineTopology_deleteEdges (MR_PolylineTopology *_this, const MR_UndirectedEdgeBitSet *es)
 
MRC_API MR_uint64_t MR_PolylineTopology_heapBytes (const MR_PolylineTopology *_this)
 
MRC_API void MR_PolylineTopology_splice (MR_PolylineTopology *_this, MR_EdgeId a, MR_EdgeId b)
 
MRC_API MR_EdgeId MR_PolylineTopology_next (const MR_PolylineTopology *_this, MR_EdgeId he)
 
MRC_API MR_VertId MR_PolylineTopology_org (const MR_PolylineTopology *_this, MR_EdgeId he)
 
MRC_API MR_VertId MR_PolylineTopology_dest (const MR_PolylineTopology *_this, MR_EdgeId he)
 
MRC_API void MR_PolylineTopology_setOrg (MR_PolylineTopology *_this, MR_EdgeId a, MR_VertId v)
 
MRC_API const MR_Vector_MR_EdgeId_MR_VertIdMR_PolylineTopology_edgePerVertex (const MR_PolylineTopology *_this)
 
MRC_API MR_Vector_MR_VertId_MR_EdgeIdMR_PolylineTopology_getOrgs (const MR_PolylineTopology *_this)
 
MRC_API MR_EdgeId MR_PolylineTopology_edgeWithOrg (const MR_PolylineTopology *_this, MR_VertId a)
 
MRC_API bool MR_PolylineTopology_hasVert (const MR_PolylineTopology *_this, MR_VertId a)
 
MRC_API int32_t MR_PolylineTopology_getVertDegree (const MR_PolylineTopology *_this, MR_VertId a)
 
MRC_API int32_t MR_PolylineTopology_numValidVerts (const MR_PolylineTopology *_this)
 
MRC_API MR_VertId MR_PolylineTopology_lastValidVert (const MR_PolylineTopology *_this)
 
MRC_API MR_VertId MR_PolylineTopology_addVertId (MR_PolylineTopology *_this)
 
MRC_API void MR_PolylineTopology_vertResize (MR_PolylineTopology *_this, MR_uint64_t newSize)
 
MRC_API void MR_PolylineTopology_vertResizeWithReserve (MR_PolylineTopology *_this, MR_uint64_t newSize)
 
MRC_API void MR_PolylineTopology_vertReserve (MR_PolylineTopology *_this, MR_uint64_t newCapacity)
 
MRC_API MR_uint64_t MR_PolylineTopology_vertSize (const MR_PolylineTopology *_this)
 
MRC_API MR_uint64_t MR_PolylineTopology_vertCapacity (const MR_PolylineTopology *_this)
 
MRC_API const MR_VertBitSetMR_PolylineTopology_getValidVerts (const MR_PolylineTopology *_this)
 
MRC_API const MR_VertBitSetMR_PolylineTopology_getVertIds (const MR_PolylineTopology *_this, const MR_VertBitSet *region)
 
MRC_API MR_EdgeId MR_PolylineTopology_findEdge (const MR_PolylineTopology *_this, MR_VertId o, MR_VertId d)
 
MRC_API MR_VertBitSetMR_PolylineTopology_getPathVertices (const MR_PolylineTopology *_this, const MR_std_vector_MR_EdgeId *path)
 
MRC_API MR_EdgeId MR_PolylineTopology_splitEdge (MR_PolylineTopology *_this, MR_EdgeId e)
 
MRC_API MR_EdgeId MR_PolylineTopology_makePolyline (MR_PolylineTopology *_this, const MR_VertId *vs, MR_uint64_t num)
 
MRC_API void MR_PolylineTopology_addPart (MR_PolylineTopology *_this, const MR_PolylineTopology *from, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
 
MRC_API void MR_PolylineTopology_addPartByMask (MR_PolylineTopology *_this, const MR_PolylineTopology *from, const MR_UndirectedEdgeBitSet *mask, MR_VertMap *outVmap, MR_EdgeMap *outEmap)
 
MRC_API void MR_PolylineTopology_pack (MR_PolylineTopology *_this, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
 
MRC_API void MR_PolylineTopology_write (const MR_PolylineTopology *_this, MR_std_ostream *s)
 
MRC_API bool MR_PolylineTopology_read (MR_PolylineTopology *_this, MR_std_istream *s)
 
MRC_API bool MR_equal_MR_PolylineTopology (const MR_PolylineTopology *_this, const MR_PolylineTopology *b)
 
MRC_API bool MR_not_equal_MR_PolylineTopology (const MR_PolylineTopology *_this, const MR_PolylineTopology *b)
 
MRC_API bool MR_PolylineTopology_isConsistentlyOriented (const MR_PolylineTopology *_this)
 
MRC_API void MR_PolylineTopology_flip (MR_PolylineTopology *_this)
 
MRC_API bool MR_PolylineTopology_checkValidity (const MR_PolylineTopology *_this)
 
MRC_API void MR_PolylineTopology_computeValidsFromEdges (MR_PolylineTopology *_this)
 
MRC_API bool MR_PolylineTopology_isClosed (const MR_PolylineTopology *_this)
 
MRC_API MR_PolylineTopologyMR_PolylineMaker_Get_topology (const MR_PolylineMaker *_this)
 
MRC_API MR_PolylineMakerMR_PolylineMaker_ConstructFromAnother (const MR_PolylineMaker *_other)
 
MRC_API const MR_PolylineMakerMR_PolylineMaker_OffsetPtr (const MR_PolylineMaker *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_PolylineMakerMR_PolylineMaker_OffsetMutablePtr (MR_PolylineMaker *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_PolylineMakerMR_PolylineMaker_Construct (MR_PolylineTopology *t)
 
MRC_API void MR_PolylineMaker_Destroy (const MR_PolylineMaker *_this)
 Destroys a heap-allocated instance of MR_PolylineMaker. Does nothing if the pointer is null.
 
MRC_API void MR_PolylineMaker_DestroyArray (const MR_PolylineMaker *_this)
 Destroys a heap-allocated array of MR_PolylineMaker. Does nothing if the pointer is null.
 
MRC_API MR_EdgeId MR_PolylineMaker_start (MR_PolylineMaker *_this, MR_VertId v)
 
MRC_API MR_EdgeId MR_PolylineMaker_proceed (MR_PolylineMaker *_this, MR_VertId v)
 
MRC_API void MR_PolylineMaker_close (MR_PolylineMaker *_this)
 
MRC_API void MR_PolylineMaker_finishOpen (MR_PolylineMaker *_this, MR_VertId v)
 

Typedef Documentation

◆ MR_EdgeMap

typedef struct MR_EdgeMap MR_EdgeMap

◆ MR_Edges

typedef struct MR_Edges MR_Edges

◆ MR_PolylineMaker

simplifies construction of connected polyline in the topology Generated from class MR::PolylineMaker.

◆ MR_PolylineTopology

topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines Generated from class MR::PolylineTopology.

◆ MR_std_istream

◆ MR_std_ostream

◆ MR_std_vector_MR_EdgeId

◆ MR_std_vector_MR_VertId

◆ MR_UndirectedEdgeBitSet

◆ MR_Vector_MR_EdgeId_MR_VertId

◆ MR_Vector_MR_VertId_MR_EdgeId

◆ MR_VertBitSet

typedef struct MR_VertBitSet MR_VertBitSet

◆ MR_VertMap

typedef struct MR_VertMap MR_VertMap

◆ MR_WholeEdgeMap

Function Documentation

◆ MR_equal_MR_PolylineTopology()

MRC_API bool MR_equal_MR_PolylineTopology ( const MR_PolylineTopology * _this,
const MR_PolylineTopology * b )

comparison via edges (all other members are considered as not important caches) Generated from a method of class MR::PolylineTopology named operator==. Parameter _this can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_not_equal_MR_PolylineTopology()

MRC_API bool MR_not_equal_MR_PolylineTopology ( const MR_PolylineTopology * _this,
const MR_PolylineTopology * b )

Generated from a method of class MR::PolylineTopology named operator!=. Parameter _this can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_PolylineMaker_close()

MRC_API void MR_PolylineMaker_close ( MR_PolylineMaker * _this)

closes the polyline Generated from a method of class MR::PolylineMaker named close. Parameter _this can not be null. It is a single object.

◆ MR_PolylineMaker_Construct()

MRC_API MR_PolylineMaker * MR_PolylineMaker_Construct ( MR_PolylineTopology * t)

Generated from a constructor of class MR::PolylineMaker. Parameter t can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_PolylineMaker_Destroy() to free it when you're done using it.

◆ MR_PolylineMaker_ConstructFromAnother()

MRC_API MR_PolylineMaker * MR_PolylineMaker_ConstructFromAnother ( const MR_PolylineMaker * _other)

Generated from a constructor of class MR::PolylineMaker. Parameter _other can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_PolylineMaker_Destroy() to free it when you're done using it.

◆ MR_PolylineMaker_Destroy()

MRC_API void MR_PolylineMaker_Destroy ( const MR_PolylineMaker * _this)

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

◆ MR_PolylineMaker_DestroyArray()

MRC_API void MR_PolylineMaker_DestroyArray ( const MR_PolylineMaker * _this)

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

◆ MR_PolylineMaker_finishOpen()

MRC_API void MR_PolylineMaker_finishOpen ( MR_PolylineMaker * _this,
MR_VertId v )

finishes the polyline adding final vertex in it Generated from a method of class MR::PolylineMaker named finishOpen. Parameter _this can not be null. It is a single object.

◆ MR_PolylineMaker_Get_topology()

MRC_API MR_PolylineTopology * MR_PolylineMaker_Get_topology ( const MR_PolylineMaker * _this)

Returns a pointer to a member variable of class MR::PolylineMaker named topology. 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_PolylineMaker_OffsetMutablePtr()

MRC_API MR_PolylineMaker * MR_PolylineMaker_OffsetMutablePtr ( MR_PolylineMaker * 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_PolylineMaker_OffsetPtr()

MRC_API const MR_PolylineMaker * MR_PolylineMaker_OffsetPtr ( const MR_PolylineMaker * 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_PolylineMaker_proceed()

MRC_API MR_EdgeId MR_PolylineMaker_proceed ( MR_PolylineMaker * _this,
MR_VertId v )

makes next edge of polyline

Parameters
vnext vertex of the polyline Generated from a method of class MR::PolylineMaker named proceed. Parameter _this can not be null. It is a single object.

◆ MR_PolylineMaker_start()

MRC_API MR_EdgeId MR_PolylineMaker_start ( MR_PolylineMaker * _this,
MR_VertId v )

creates first edge of polyline

Parameters
vfirst vertex of the polyline Generated from a method of class MR::PolylineMaker named start. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_addPart()

MRC_API void MR_PolylineTopology_addPart ( MR_PolylineTopology * _this,
const MR_PolylineTopology * from,
MR_VertMap * outVmap,
MR_WholeEdgeMap * outEmap )

appends polyline topology (from) in addition to the current topology: creates new edges, verts;

Parameters
outVmap,outEmap(optionally) returns mappings: from.id -> this.id Generated from a method of class MR::PolylineTopology named addPart. Parameter _this can not be null. It is a single object. Parameter from can not be null. It is a single object. Parameter outVmap defaults to a null pointer in C++. Parameter outEmap defaults to a null pointer in C++.

◆ MR_PolylineTopology_addPartByMask()

MRC_API void MR_PolylineTopology_addPartByMask ( MR_PolylineTopology * _this,
const MR_PolylineTopology * from,
const MR_UndirectedEdgeBitSet * mask,
MR_VertMap * outVmap,
MR_EdgeMap * outEmap )

appends polyline topology (from) in addition to the current topology: creates new edges, verts; Generated from a method of class MR::PolylineTopology named addPartByMask. Parameter _this can not be null. It is a single object. Parameter from can not be null. It is a single object. Parameter mask can not be null. It is a single object. Parameter outVmap defaults to a null pointer in C++. Parameter outEmap defaults to a null pointer in C++.

◆ MR_PolylineTopology_addVertId()

MRC_API MR_VertId MR_PolylineTopology_addVertId ( MR_PolylineTopology * _this)

creates new vert-id not associated with any edge yet Generated from a method of class MR::PolylineTopology named addVertId. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_AssignFromAnother()

MRC_API MR_PolylineTopology * MR_PolylineTopology_AssignFromAnother ( MR_PolylineTopology * _this,
MR_PassBy _other_pass_by,
MR_PolylineTopology * _other )

Generated from a method of class MR::PolylineTopology 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_PolylineTopology_buildOpenLines()

MRC_API void MR_PolylineTopology_buildOpenLines ( MR_PolylineTopology * _this,
const MR_std_vector_MR_VertId * comp2firstVert )

build topology of comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in

Parameters
comp2firstVertdefines vertex range of a polyline [a,b) Generated from a method of class MR::PolylineTopology named buildOpenLines. Parameter _this can not be null. It is a single object. Parameter comp2firstVert can not be null. It is a single object.

◆ MR_PolylineTopology_checkValidity()

MRC_API bool MR_PolylineTopology_checkValidity ( const MR_PolylineTopology * _this)

verifies that all internal data structures are valid Generated from a method of class MR::PolylineTopology named checkValidity. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_computeNotLoneUndirectedEdges()

MRC_API MR_uint64_t MR_PolylineTopology_computeNotLoneUndirectedEdges ( const MR_PolylineTopology * _this)

computes the number of not-lone (valid) undirected edges Generated from a method of class MR::PolylineTopology named computeNotLoneUndirectedEdges. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_computeValidsFromEdges()

MRC_API void MR_PolylineTopology_computeValidsFromEdges ( MR_PolylineTopology * _this)

computes numValidVerts_ and validVerts_ from edgePerVertex_ Generated from a method of class MR::PolylineTopology named computeValidsFromEdges. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_ConstructFromAnother()

MRC_API MR_PolylineTopology * MR_PolylineTopology_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_PolylineTopology * _other )

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

◆ MR_PolylineTopology_DefaultConstruct()

MRC_API MR_PolylineTopology * MR_PolylineTopology_DefaultConstruct ( void )

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

◆ MR_PolylineTopology_DefaultConstructArray()

MRC_API MR_PolylineTopology * MR_PolylineTopology_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_PolylineTopology_DestroyArray(). Use MR_PolylineTopology_OffsetMutablePtr() and MR_PolylineTopology_OffsetPtr() to access the array elements.

◆ MR_PolylineTopology_deleteEdge()

MRC_API void MR_PolylineTopology_deleteEdge ( MR_PolylineTopology * _this,
MR_UndirectedEdgeId ue )

given edge becomes lone after the call, so it is un-spliced from connected edges, and if it was not connected at origin or destination, then that vertex is deleted as well Generated from a method of class MR::PolylineTopology named deleteEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_deleteEdges()

MRC_API void MR_PolylineTopology_deleteEdges ( MR_PolylineTopology * _this,
const MR_UndirectedEdgeBitSet * es )

calls deleteEdge for every set bit Generated from a method of class MR::PolylineTopology named deleteEdges. Parameter _this can not be null. It is a single object. Parameter es can not be null. It is a single object.

◆ MR_PolylineTopology_dest()

MRC_API MR_VertId MR_PolylineTopology_dest ( const MR_PolylineTopology * _this,
MR_EdgeId he )

returns destination vertex of half-edge Generated from a method of class MR::PolylineTopology named dest. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_Destroy()

MRC_API void MR_PolylineTopology_Destroy ( const MR_PolylineTopology * _this)

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

◆ MR_PolylineTopology_DestroyArray()

MRC_API void MR_PolylineTopology_DestroyArray ( const MR_PolylineTopology * _this)

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

◆ MR_PolylineTopology_edgeCapacity()

MRC_API MR_uint64_t MR_PolylineTopology_edgeCapacity ( const MR_PolylineTopology * _this)

returns the number of allocated edge records Generated from a method of class MR::PolylineTopology named edgeCapacity. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_edgePerVertex()

MRC_API const MR_Vector_MR_EdgeId_MR_VertId * MR_PolylineTopology_edgePerVertex ( const MR_PolylineTopology * _this)

for all valid vertices this vector contains an edge with the origin there Generated from a method of class MR::PolylineTopology named edgePerVertex. 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_PolylineTopology_edgeReserve()

MRC_API void MR_PolylineTopology_edgeReserve ( MR_PolylineTopology * _this,
MR_uint64_t newCapacity )

sets the capacity of half-edges vector Generated from a method of class MR::PolylineTopology named edgeReserve. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_edgeSize()

MRC_API MR_uint64_t MR_PolylineTopology_edgeSize ( const MR_PolylineTopology * _this)

returns the number of half-edge records including lone ones Generated from a method of class MR::PolylineTopology named edgeSize. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_edgeWithOrg()

MRC_API MR_EdgeId MR_PolylineTopology_edgeWithOrg ( const MR_PolylineTopology * _this,
MR_VertId a )

returns valid edge if given vertex is present in the mesh Generated from a method of class MR::PolylineTopology named edgeWithOrg. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_findEdge()

MRC_API MR_EdgeId MR_PolylineTopology_findEdge ( const MR_PolylineTopology * _this,
MR_VertId o,
MR_VertId d )

finds and returns edge from o to d in the mesh; returns invalid edge otherwise Generated from a method of class MR::PolylineTopology named findEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_flip()

MRC_API void MR_PolylineTopology_flip ( MR_PolylineTopology * _this)

changes the orientation of all edges: every edge e is replaced with e.sym() Generated from a method of class MR::PolylineTopology named flip. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_getOrgs()

MRC_API MR_Vector_MR_VertId_MR_EdgeId * MR_PolylineTopology_getOrgs ( const MR_PolylineTopology * _this)

for all edges this vector contains its origin Generated from a method of class MR::PolylineTopology named getOrgs. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Vector_MR_VertId_MR_EdgeId_Destroy() to free it when you're done using it.

◆ MR_PolylineTopology_getPathVertices()

MRC_API MR_VertBitSet * MR_PolylineTopology_getPathVertices ( const MR_PolylineTopology * _this,
const MR_std_vector_MR_EdgeId * path )

returns all vertices incident to path edges Generated from a method of class MR::PolylineTopology named getPathVertices. Parameter _this can not be null. It is a single object. Parameter path can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertBitSet_Destroy() to free it when you're done using it.

◆ MR_PolylineTopology_getValidVerts()

MRC_API const MR_VertBitSet * MR_PolylineTopology_getValidVerts ( const MR_PolylineTopology * _this)

returns cached set of all valid vertices Generated from a method of class MR::PolylineTopology named getValidVerts. 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_PolylineTopology_getVertDegree()

MRC_API int32_t MR_PolylineTopology_getVertDegree ( const MR_PolylineTopology * _this,
MR_VertId a )

returns 0 if given vertex does not exist, 1 if it has one incident edge, and 2 if it has two incident edges Generated from a method of class MR::PolylineTopology named getVertDegree. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_getVertIds()

MRC_API const MR_VertBitSet * MR_PolylineTopology_getVertIds ( const MR_PolylineTopology * _this,
const MR_VertBitSet * region )

if region pointer is not null then converts it in reference, otherwise returns all valid vertices in the mesh Generated from a method of class MR::PolylineTopology named getVertIds. 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_PolylineTopology_hasEdge()

MRC_API bool MR_PolylineTopology_hasEdge ( const MR_PolylineTopology * _this,
MR_EdgeId e )

returns true if given edge is within valid range and not-lone Generated from a method of class MR::PolylineTopology named hasEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_hasVert()

MRC_API bool MR_PolylineTopology_hasVert ( const MR_PolylineTopology * _this,
MR_VertId a )

returns true if given vertex is present in the mesh Generated from a method of class MR::PolylineTopology named hasVert. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_heapBytes()

MRC_API MR_uint64_t MR_PolylineTopology_heapBytes ( const MR_PolylineTopology * _this)

returns the amount of memory this object occupies on heap Generated from a method of class MR::PolylineTopology named heapBytes. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_isClosed()

MRC_API bool MR_PolylineTopology_isClosed ( const MR_PolylineTopology * _this)

returns true if the polyline does not have any holes Generated from a method of class MR::PolylineTopology named isClosed. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_isConsistentlyOriented()

MRC_API bool MR_PolylineTopology_isConsistentlyOriented ( const MR_PolylineTopology * _this)

returns true if for each edge e: e == e.next() || e.odd() == next( e ).sym().odd() Generated from a method of class MR::PolylineTopology named isConsistentlyOriented. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_isLoneEdge()

MRC_API bool MR_PolylineTopology_isLoneEdge ( const MR_PolylineTopology * _this,
MR_EdgeId a )

checks whether the edge is disconnected from all other edges and disassociated from all vertices (as if after makeEdge) Generated from a method of class MR::PolylineTopology named isLoneEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_lastNotLoneEdge()

MRC_API MR_EdgeId MR_PolylineTopology_lastNotLoneEdge ( const MR_PolylineTopology * _this)

returns last not lone edge id, or invalid id if no such edge exists Generated from a method of class MR::PolylineTopology named lastNotLoneEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_lastNotLoneUndirectedEdge()

MRC_API MR_UndirectedEdgeId MR_PolylineTopology_lastNotLoneUndirectedEdge ( const MR_PolylineTopology * _this)

returns last not lone undirected edge id, or invalid id if no such edge exists Generated from a method of class MR::PolylineTopology named lastNotLoneUndirectedEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_lastValidVert()

MRC_API MR_VertId MR_PolylineTopology_lastValidVert ( const MR_PolylineTopology * _this)

returns last valid vertex id, or invalid id if no single valid vertex exists Generated from a method of class MR::PolylineTopology named lastValidVert. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_makeEdge_0()

MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_0 ( MR_PolylineTopology * _this)

creates an edge not associated with any vertex Generated from a method of class MR::PolylineTopology named makeEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_makeEdge_3()

MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_3 ( MR_PolylineTopology * _this,
MR_VertId a,
MR_VertId b,
const MR_EdgeId * e )

makes an edge connecting vertices a and b

Parameters
eif valid then the function does not make new edge, but connects the vertices using given one (and returns it)

if 1) any of the vertices is invalid or not within the vertSize(), 2) or a==b, 3) or either a or b already has 2 incident edges, 4) given edge e is not lone or not within the edgeSize() then makeEdge(a,b) does nothing and returns invalid edge Generated from a method of class MR::PolylineTopology named makeEdge. Parameter _this can not be null. It is a single object. Parameter e has a default argument: {}, pass a null pointer to use it.

◆ MR_PolylineTopology_makeEdges()

MRC_API int32_t MR_PolylineTopology_makeEdges ( MR_PolylineTopology * _this,
const MR_Edges * edges )

for every given edge[ue] calls makeEdge( edge[ue][0], edge[ue][1], ue ), making new edges so that edges.size() <= undirectedEdgeSize() at the end

Returns
the total number of edges created Generated from a method of class MR::PolylineTopology named makeEdges. Parameter _this can not be null. It is a single object. Parameter edges can not be null. It is a single object.

◆ MR_PolylineTopology_makePolyline()

MRC_API MR_EdgeId MR_PolylineTopology_makePolyline ( MR_PolylineTopology * _this,
const MR_VertId * vs,
MR_uint64_t num )

adds polyline in this topology passing progressively via vertices *[vs, vs+num); if vs[0] == vs[num-1] then a closed polyline is created; return the edge from first to second vertex Generated from a method of class MR::PolylineTopology named makePolyline. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_next()

MRC_API MR_EdgeId MR_PolylineTopology_next ( const MR_PolylineTopology * _this,
MR_EdgeId he )

next (counter clock wise) half-edge in the origin ring Generated from a method of class MR::PolylineTopology named next. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_numValidVerts()

MRC_API int32_t MR_PolylineTopology_numValidVerts ( const MR_PolylineTopology * _this)

returns the number of valid vertices Generated from a method of class MR::PolylineTopology named numValidVerts. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_OffsetMutablePtr()

MRC_API MR_PolylineTopology * MR_PolylineTopology_OffsetMutablePtr ( MR_PolylineTopology * 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_PolylineTopology_OffsetPtr()

MRC_API const MR_PolylineTopology * MR_PolylineTopology_OffsetPtr ( const MR_PolylineTopology * 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_PolylineTopology_org()

MRC_API MR_VertId MR_PolylineTopology_org ( const MR_PolylineTopology * _this,
MR_EdgeId he )

returns origin vertex of half-edge Generated from a method of class MR::PolylineTopology named org. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_pack()

MRC_API void MR_PolylineTopology_pack ( MR_PolylineTopology * _this,
MR_VertMap * outVmap,
MR_WholeEdgeMap * outEmap )

tightly packs all arrays eliminating lone edges and invalid vertices

Parameters
outVmap,outEmapif given returns mappings: old.id -> new.id; Generated from a method of class MR::PolylineTopology named pack. Parameter _this can not be null. It is a single object. Parameter outVmap defaults to a null pointer in C++. Parameter outEmap defaults to a null pointer in C++.

◆ MR_PolylineTopology_read()

MRC_API bool MR_PolylineTopology_read ( MR_PolylineTopology * _this,
MR_std_istream * s )

loads this from binary stream Generated from a method of class MR::PolylineTopology named read. Parameter _this can not be null. It is a single object. Parameter s can not be null. It is a single object.

◆ MR_PolylineTopology_setOrg()

MRC_API void MR_PolylineTopology_setOrg ( MR_PolylineTopology * _this,
MR_EdgeId a,
MR_VertId v )

sets new origin to the full origin ring including this edge

edgePerVertex_ table is updated accordingly Generated from a method of class MR::PolylineTopology named setOrg. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_splice()

MRC_API void MR_PolylineTopology_splice ( MR_PolylineTopology * _this,
MR_EdgeId a,
MR_EdgeId b )

given two half edges do either of two:
1) if a and b were from distinct rings, puts them in one ring;
2) if a and b were from the same ring, puts them in separate rings;

the cut in rings in both cases is made after a and b Generated from a method of class MR::PolylineTopology named splice. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_splitEdge()

MRC_API MR_EdgeId MR_PolylineTopology_splitEdge ( MR_PolylineTopology * _this,
MR_EdgeId e )

split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split) Generated from a method of class MR::PolylineTopology named splitEdge. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_undirectedEdgeCapacity()

MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeCapacity ( const MR_PolylineTopology * _this)

returns the number of allocated undirected edges (pairs of half-edges) Generated from a method of class MR::PolylineTopology named undirectedEdgeCapacity. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_undirectedEdgeSize()

MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeSize ( const MR_PolylineTopology * _this)

returns the number of undirected edges (pairs of half-edges) including lone ones Generated from a method of class MR::PolylineTopology named undirectedEdgeSize. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_vertCapacity()

MRC_API MR_uint64_t MR_PolylineTopology_vertCapacity ( const MR_PolylineTopology * _this)

returns the number of allocated vert records Generated from a method of class MR::PolylineTopology named vertCapacity. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_vertReserve()

MRC_API void MR_PolylineTopology_vertReserve ( MR_PolylineTopology * _this,
MR_uint64_t newCapacity )

sets the capacity of vertices vector Generated from a method of class MR::PolylineTopology named vertReserve. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_vertResize()

MRC_API void MR_PolylineTopology_vertResize ( MR_PolylineTopology * _this,
MR_uint64_t newSize )

explicitly increases the size of vertices vector Generated from a method of class MR::PolylineTopology named vertResize. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_vertResizeWithReserve()

MRC_API void MR_PolylineTopology_vertResizeWithReserve ( MR_PolylineTopology * _this,
MR_uint64_t newSize )

explicitly increases the size of vertices vector, doubling the current capacity if it was not enough Generated from a method of class MR::PolylineTopology named vertResizeWithReserve. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_vertSize()

MRC_API MR_uint64_t MR_PolylineTopology_vertSize ( const MR_PolylineTopology * _this)

returns the number of vertex records including invalid ones Generated from a method of class MR::PolylineTopology named vertSize. Parameter _this can not be null. It is a single object.

◆ MR_PolylineTopology_write()

MRC_API void MR_PolylineTopology_write ( const MR_PolylineTopology * _this,
MR_std_ostream * s )

saves this in binary stream Generated from a method of class MR::PolylineTopology named write. Parameter _this can not be null. It is a single object. Parameter s can not be null. It is a single object.