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

Go to the source code of this file.

Typedefs

typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_Vector3f MR_Vector3f
 
typedef struct MR_expected_std_vector_MR_EdgeId_std_string MR_expected_std_vector_MR_EdgeId_std_string
 
typedef struct MR_std_function_float_from_MR_EdgeId MR_std_function_float_from_MR_EdgeId
 
typedef struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId
 
typedef struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId
 

Functions

MRC_API MR_expected_std_vector_MR_EdgeId_std_stringMR_surroundingContour_std_vector_MR_EdgeId (const MR_Mesh *mesh, MR_PassBy includeEdges_pass_by, MR_std_vector_MR_EdgeId *includeEdges, const MR_std_function_float_from_MR_EdgeId *edgeMetric, const MR_Vector3f *dir)
 Find the best closed edge loop passing through given edges, which minimizes the sum of given edge metric. The algorithm assumes that input edges can be projected on the plane orthogonal to given direction, then the center point of all input edges is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input edges.
 
MRC_API MR_expected_std_vector_MR_EdgeId_std_stringMR_surroundingContour_std_vector_MR_VertId (const MR_Mesh *mesh, MR_PassBy keyVertices_pass_by, MR_std_vector_MR_VertId *keyVertices, const MR_std_function_float_from_MR_EdgeId *edgeMetric, const MR_Vector3f *dir)
 Find the best closed edge loop passing through given vertices, which minimizes the sum of given edge metric. The algorithm assumes that input vertices can be projected on the plane orthogonal to given direction, then the center point of all input vertices is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input vertices.
 

Typedef Documentation

◆ MR_expected_std_vector_MR_EdgeId_std_string

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_std_function_float_from_MR_EdgeId

◆ MR_std_vector_MR_EdgeId

◆ MR_std_vector_MR_VertId

◆ MR_Vector3f

typedef struct MR_Vector3f MR_Vector3f

Function Documentation

◆ MR_surroundingContour_std_vector_MR_EdgeId()

MRC_API MR_expected_std_vector_MR_EdgeId_std_string * MR_surroundingContour_std_vector_MR_EdgeId ( const MR_Mesh * mesh,
MR_PassBy includeEdges_pass_by,
MR_std_vector_MR_EdgeId * includeEdges,
const MR_std_function_float_from_MR_EdgeId * edgeMetric,
const MR_Vector3f * dir )

Find the best closed edge loop passing through given edges, which minimizes the sum of given edge metric. The algorithm assumes that input edges can be projected on the plane orthogonal to given direction, then the center point of all input edges is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input edges.

Parameters
includeEdgescontain all edges in arbitrary order that must be present in the returned loop, probably with reversed direction (should have at least 2 elements)
edgeMetricreturned loop will minimize the sum of this metric
dirdirection approximately orthogonal to the loop, the resulting loop will be oriented clockwise if look from the direction's tip Generated from function MR::surroundingContour. Parameter mesh can not be null. It is a single object. Parameter edgeMetric can not be null. It is a single object. Parameter dir can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_vector_MR_EdgeId_std_string_Destroy() to free it when you're done using it.

◆ MR_surroundingContour_std_vector_MR_VertId()

MRC_API MR_expected_std_vector_MR_EdgeId_std_string * MR_surroundingContour_std_vector_MR_VertId ( const MR_Mesh * mesh,
MR_PassBy keyVertices_pass_by,
MR_std_vector_MR_VertId * keyVertices,
const MR_std_function_float_from_MR_EdgeId * edgeMetric,
const MR_Vector3f * dir )

Find the best closed edge loop passing through given vertices, which minimizes the sum of given edge metric. The algorithm assumes that input vertices can be projected on the plane orthogonal to given direction, then the center point of all input vertices is found, and each segment of the searched loop is within infinite pie sector with this center and the borders passing via two sorted input vertices.

Parameters
keyVerticescontain all vertices in arbitrary order that returned loop must pass (should have at least 2 elements)
edgeMetricreturned loop will minimize the sum of this metric
dirdirection approximately orthogonal to the loop, the resulting loop will be oriented clockwise if look from the direction's tip Generated from function MR::surroundingContour. Parameter mesh can not be null. It is a single object. Parameter edgeMetric can not be null. It is a single object. Parameter dir can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_vector_MR_EdgeId_std_string_Destroy() to free it when you're done using it.