| 617 | } |
| 618 | |
| 619 | float 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 | |
| 634 | float geodesicPathLength( const Mesh& mesh, const GeodesicPath& path ) |
| 635 | { |
no test coverage detected