MeshLib C Docs
Loading...
Searching...
No Matches
MRGeodesicPath.h File Reference
#include <MRCMesh/MRId.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stdint.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_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint
 
typedef struct MR_std_vector_MR_Vector2f MR_std_vector_MR_Vector2f
 

Functions

MRC_API bool MR_reducePathViaVertex (const MR_Mesh *mesh, const MR_MeshTriPoint *start, MR_VertId v, const MR_MeshTriPoint *end, MR_std_vector_MR_EdgePoint *outPath, MR_std_vector_MR_Vector2f *tmp, MR_std_vector_MR_EdgePoint *cachePath)
 
MRC_API int32_t MR_reducePath (const MR_Mesh *mesh, const MR_MeshTriPoint *start, MR_std_vector_MR_EdgePoint *path, const MR_MeshTriPoint *end, const int32_t *maxIter)
 

Typedef Documentation

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_MeshTriPoint

◆ MR_std_vector_MR_EdgePoint

◆ MR_std_vector_MR_Vector2f

Function Documentation

◆ MR_reducePath()

MRC_API int32_t MR_reducePath ( const MR_Mesh * mesh,
const MR_MeshTriPoint * start,
MR_std_vector_MR_EdgePoint * path,
const MR_MeshTriPoint * end,
const int32_t * maxIter )

converts any input surface path into geodesic path (so reduces its length): start-path-end; returns actual number of iterations performed Generated from function MR::reducePath. Parameter mesh can not be null. It is a single object. Parameter start can not be null. It is a single object. Parameter path can not be null. It is a single object. Parameter end can not be null. It is a single object. Parameter maxIter has a default argument: 5, pass a null pointer to use it.

◆ MR_reducePathViaVertex()

MRC_API bool MR_reducePathViaVertex ( const MR_Mesh * mesh,
const MR_MeshTriPoint * start,
MR_VertId v,
const MR_MeshTriPoint * end,
MR_std_vector_MR_EdgePoint * outPath,
MR_std_vector_MR_Vector2f * tmp,
MR_std_vector_MR_EdgePoint * cachePath )

given path s-v-e, tries to decrease its length by moving away from v

Parameters
outPathintermediate locations between s and e will be added here
tmpelements will be temporary allocated here
cachePathas far as we need two sides unfold, cache one to reduce allocations Generated from function MR::reducePathViaVertex. Parameter mesh can not be null. It is a single object. Parameter start can not be null. It is a single object. Parameter end can not be null. It is a single object. Parameter outPath can not be null. It is a single object. Parameter tmp can not be null. It is a single object. Parameter cachePath can not be null. It is a single object.