ImFusion SDK 4.3
MeshGeodesicDistance Class Reference

#include <ImFusion/Mesh/MeshGeodesicDistance.h>

Class for computing the geodesic distance on the mesh surface between the 2 points. More...

Detailed Description

Class for computing the geodesic distance on the mesh surface between the 2 points.

Public Member Functions

 MeshGeodesicDistance (const Mesh &mesh)
 Creates the algorithm instance with a data.
 
 ~MeshGeodesicDistance ()
 Deletes owned resources.
 
double distanceBetweenFaces (unsigned int id1, unsigned int id2, std::vector< vec3 > *path=nullptr)
 Returns the geodesic distance between the centers of two faces, -1 if indices are invalid.
 
double distanceBetweenFaces (const std::pair< unsigned int, vec3 > &face1, const std::pair< unsigned int, vec3 > &face2, std::vector< vec3 > *path=nullptr)
 Returns the geodesic distance between the points of two faces, -1 if indices are invalid.
 
double distanceBetweenVertices (unsigned int id1, unsigned int id2, std::vector< vec3 > *path=nullptr)
 Returns the geodesic distance between the two vertices, -1 if indices are invalid.
 
std::vector< double > distance (const std::vector< unsigned int > &VS, const std::vector< unsigned int > &FS, const std::vector< unsigned int > &VT, const std::vector< unsigned int > &FT, std::vector< std::vector< vec3 > > *contours=nullptr)
 Exact geodesic distance.
 

Member Function Documentation

◆ distanceBetweenFaces()

double distanceBetweenFaces ( const std::pair< unsigned int, vec3 > & face1,
const std::pair< unsigned int, vec3 > & face2,
std::vector< vec3 > * path = nullptr )

Returns the geodesic distance between the points of two faces, -1 if indices are invalid.

First element of the pair spesifies the id of the face, the second element specifies a point that is located within the face

◆ distance()

std::vector< double > distance ( const std::vector< unsigned int > & VS,
const std::vector< unsigned int > & FS,
const std::vector< unsigned int > & VT,
const std::vector< unsigned int > & FT,
std::vector< std::vector< vec3 > > * contours = nullptr )

Exact geodesic distance.

Parameters
VSvector specifying indices of source vertices
FSvector specifying indices of source faces
VTvector specifying indices of target vertices
FTvector specifying indices of target faces
contoursoptional output vector cntaining the shortest paths to targets
Returns
#VT+#FT vector of geodesic distances of each target w.r.t. the nearest one in the source set
Note
Specifying a face as target/source means its center

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close