| 214 | } |
| 215 | |
| 216 | std::vector<VertId> PointCloud::getLexicographicalOrder() const |
| 217 | { |
| 218 | MR_TIMER; |
| 219 | std::vector<VertId> lexyOrder; |
| 220 | lexyOrder.reserve( validPoints.count() ); |
| 221 | for ( auto v : validPoints ) |
| 222 | lexyOrder.push_back( v ); |
| 223 | tbb::parallel_sort( lexyOrder.begin(), lexyOrder.end(), [&] ( VertId l, VertId r ) |
| 224 | { |
| 225 | const auto& ptL = points[l]; |
| 226 | const auto& ptR = points[r]; |
| 227 | return std::tuple{ ptL.x, ptL.y, ptL.z } < std::tuple{ ptR.x, ptR.y, ptR.z }; |
| 228 | } ); |
| 229 | return lexyOrder; |
| 230 | } |
| 231 | |
| 232 | VertBMap PointCloud::pack( Reorder reoder ) |
| 233 | { |