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

Function buildSmallestMetricPath

source/MRMesh/MREdgePaths.cpp:149–168  ·  view source on GitHub ↗

internal version with pre-initialized builder

Source from the content-addressed store, hash-verified

147
148// internal version with pre-initialized builder
149static EdgePath buildSmallestMetricPath( VertId start, EdgePathsBuilder& b, float maxPathMetric )
150{
151 for (;;)
152 {
153 auto vinfo = b.growOneEdge();
154 if ( !vinfo.v )
155 {
156 // unable to find the path
157 return {};
158 }
159 if ( vinfo.metric > maxPathMetric )
160 {
161 // unable to find the path within given metric limitation
162 return {};
163 }
164 if ( vinfo.v == start )
165 break;
166 }
167 return b.getPathBack( start );
168}
169
170EdgePath buildSmallestMetricPath( const MeshTopology& topology, const EdgeMetric& metric, VertId start, const VertBitSet& finish, float maxPathMetric /*= FLT_MAX */ )
171{

Callers 2

buildShortestPathFunction · 0.70
extractClosedLoopsFunction · 0.70

Calls 3

growOneEdgeMethod · 0.45
getPathBackMethod · 0.45
addStartMethod · 0.45

Tested by

no test coverage detected