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

Go to the source code of this file.

Typedefs

typedef struct MR_FaceBMap MR_FaceBMap
 
typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_MeshTopology MR_MeshTopology
 
typedef struct MR_UndirectedEdgeBMap MR_UndirectedEdgeBMap
 
typedef struct MR_VertBMap MR_VertBMap
 

Functions

MRC_API MR_FaceBMapMR_getOptimalFaceOrdering (const MR_Mesh *mesh)
 
MRC_API MR_VertBMapMR_getVertexOrdering_MR_FaceBMap (const MR_FaceBMap *faceMap, const MR_MeshTopology *topology)
 
MRC_API MR_UndirectedEdgeBMapMR_getEdgeOrdering (const MR_FaceBMap *faceMap, const MR_MeshTopology *topology)
 

Typedef Documentation

◆ MR_FaceBMap

typedef struct MR_FaceBMap MR_FaceBMap

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_MeshTopology

◆ MR_UndirectedEdgeBMap

◆ MR_VertBMap

typedef struct MR_VertBMap MR_VertBMap

Function Documentation

◆ MR_getEdgeOrdering()

MRC_API MR_UndirectedEdgeBMap * MR_getEdgeOrdering ( const MR_FaceBMap * faceMap,
const MR_MeshTopology * topology )

compute the order of edges given the order of faces: edges near first faces also appear first;

Parameters
faceMapold face id -> new face id Generated from function MR::getEdgeOrdering. Parameter faceMap can not be null. It is a single object. Parameter topology can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_UndirectedEdgeBMap_Destroy() to free it when you're done using it.

◆ MR_getOptimalFaceOrdering()

MRC_API MR_FaceBMap * MR_getOptimalFaceOrdering ( const MR_Mesh * mesh)

computes optimal order of faces: old face id -> new face id, the order is similar as in AABB tree, but faster to compute Generated from function MR::getOptimalFaceOrdering. Parameter mesh can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_FaceBMap_Destroy() to free it when you're done using it.

◆ MR_getVertexOrdering_MR_FaceBMap()

MRC_API MR_VertBMap * MR_getVertexOrdering_MR_FaceBMap ( const MR_FaceBMap * faceMap,
const MR_MeshTopology * topology )

compute the order of vertices given the order of faces: vertices near first faces also appear first;

Parameters
faceMapold face id -> new face id Generated from function MR::getVertexOrdering. Parameter faceMap can not be null. It is a single object. Parameter topology can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertBMap_Destroy() to free it when you're done using it.