MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / geodesicPathLength

Function geodesicPathLength

source/MRMesh/MRSurfacePath.cpp:634–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634float geodesicPathLength( const Mesh& mesh, const GeodesicPath& path )
635{
636 if ( path.mids.empty() )
637 return path.start && path.end ? distance( mesh.triPoint( path.start ), mesh.triPoint( path.end ) ) : 0;
638 float sum = 0;
639 if ( path.start )
640 sum += distance( mesh.triPoint( path.start ), mesh.edgePoint( path.mids.front() ) );
641 sum += surfacePathLength( mesh, path.mids );
642 if ( path.end )
643 sum += distance( mesh.triPoint( path.end ), mesh.edgePoint( path.mids.back() ) );
644 return sum;
645}
646
647Contour3f surfacePathToContour3f( const Mesh & mesh, const SurfacePath & line )
648{

Callers

nothing calls this directly

Calls 5

surfacePathLengthFunction · 0.85
triPointMethod · 0.80
distanceFunction · 0.70
emptyMethod · 0.45
edgePointMethod · 0.45

Tested by

no test coverage detected