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

Function surfacePathLength

source/MRMesh/MRSurfacePath.cpp:619–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619float surfacePathLength( const Mesh& mesh, const SurfacePath& surfacePath )
620{
621 if ( surfacePath.empty() )
622 return 0.0f;
623 float sum = 0.0f;
624 auto prevPoint = mesh.edgePoint( surfacePath[0] );
625 for ( int i = 1; i < surfacePath.size(); ++i )
626 {
627 auto curPoint = mesh.edgePoint( surfacePath[i] );
628 sum += ( curPoint - prevPoint ).length();
629 prevPoint = curPoint;
630 }
631 return sum;
632}
633
634float geodesicPathLength( const Mesh& mesh, const GeodesicPath& path )
635{

Callers 3

cutMeshByProjectionFunction · 0.85
geodesicPathLengthFunction · 0.85
prepareTerrainCutMethod · 0.85

Calls 4

emptyMethod · 0.45
edgePointMethod · 0.45
sizeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected