internal version with pre-initialized builder
| 147 | |
| 148 | // internal version with pre-initialized builder |
| 149 | static 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 | |
| 170 | EdgePath buildSmallestMetricPath( const MeshTopology& topology, const EdgeMetric& metric, VertId start, const VertBitSet& finish, float maxPathMetric /*= FLT_MAX */ ) |
| 171 | { |
no test coverage detected