| 9 | { |
| 10 | |
| 11 | float findMaxDistanceSqOneWay( const PointCloud& a, const PointCloud& b, const AffineXf3f* rigidB2A, float maxDistanceSq ) |
| 12 | { |
| 13 | MR_TIMER; |
| 14 | |
| 15 | return tbb::parallel_reduce |
| 16 | ( |
| 17 | tbb::blocked_range( 0_v, b.validPoints.endId() ), |
| 18 | 0.0f, |
| 19 | [&] ( const tbb::blocked_range<VertId>& range, float init ) |
| 20 | { |
| 21 | for ( VertId i = range.begin(); i < range.end(); ++i ) |
| 22 | { |
| 23 | if ( !b.validPoints.test( i ) ) |
| 24 | continue; |
| 25 | |
| 26 | auto distSq = findProjectionOnPoints( rigidB2A ? (*rigidB2A)( b.points[i] ) : b.points[i], PointCloudPart{ a }, maxDistanceSq ).distSq; |
| 27 | if ( distSq > init ) |
| 28 | init = distSq; |
| 29 | } |
| 30 | |
| 31 | return init; |
| 32 | }, |
| 33 | [] ( float a, float b ) -> float |
| 34 | { |
| 35 | return a > b ? a : b; |
| 36 | } |
| 37 | ); |
| 38 | } |
| 39 | |
| 40 | float findMaxDistanceSq( const PointCloud& a, const PointCloud& b, const AffineXf3f* rigidB2A, float maxDistanceSq ) |
| 41 | { |
no test coverage detected