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

Method findProjections

source/MRMesh/MRPointsProject.cpp:261–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261Expected<void> PointsProjector::findProjections( std::vector<PointsProjectionResult>& results,
262 const std::vector<Vector3f>& points, const FindProjectionOnPointsSettings& settings ) const
263{
264 if ( !pointCloud_ )
265 return unexpected( "No reference point cloud is set" );
266
267 /// force compute AABB tree
268 (void)pointCloud_->getAABBTree();
269
270 results.resize( points.size() );
271 ParallelFor( points, [&] ( size_t i )
272 {
273 if ( settings.valid && !settings.valid->test( i ) )
274 return;
275
276 results[i] = findProjectionOnPoints(
277 settings.xf ? ( *settings.xf )( points[i] ) : points[i],
278 *pointCloud_,
279 settings.upDistLimitSq,
280 nullptr,
281 settings.loDistLimitSq,
282 settings.skipSameIndex ? [i] ( VertId v ) { return v == i; } : VertPredicate{}
283 );
284 },
285 settings.cb );
286
287 return {};
288}
289
290size_t PointsProjector::projectionsHeapBytes( size_t ) const
291{

Callers 3

TESTFunction · 0.45
meshToDirectionVolumeFunction · 0.45
projectAllMeshVerticesFunction · 0.45

Calls 6

ParallelForFunction · 0.85
unexpectedFunction · 0.70
findProjectionOnPointsFunction · 0.70
resizeMethod · 0.45
sizeMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected