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

Method getLexicographicalOrder

source/MRMesh/MRPointCloud.cpp:216–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216std::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
232VertBMap PointCloud::pack( Reorder reoder )
233{

Callers 1

pointUniformSamplingFunction · 0.80

Calls 5

countMethod · 0.80
push_backMethod · 0.80
reserveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected