MCPcopy Create free account
hub / github.com/Kitware/VTK / MergePoints

Method MergePoints

Common/DataModel/vtkStaticPointLocator2D.cxx:1360–1381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1358// checkerboard approach to avoid write collisions.
1359template <typename TIds>
1360void BucketList2D<TIds>::MergePoints(double tol, vtkIdType* mergeMap)
1361{
1362 // First mark all points as uninitialized
1363 std::fill_n(mergeMap, this->NumPts, (-1));
1364
1365 // If tol=0, then just process points bucket by bucket. Don't have to worry
1366 // about points in other buckets.
1367 if (tol <= 0.0)
1368 {
1369 MergePrecise<TIds> merge(this, mergeMap);
1370 vtkSMPTools::For(0, this->NumBuckets, merge);
1371 }
1372
1373 // Merge within a tolerance. This is a greedy algorithm that can give
1374 // weird results since exactly which points to merge with is not an
1375 // obvious answer (without doing fancy clustering etc).
1376 else
1377 {
1378 MergeClose<TIds> merge(this, tol, mergeMap);
1379 vtkSMPTools::For(0, this->NumPts, merge);
1380 }
1381}
1382
1383//------------------------------------------------------------------------------
1384// Internal method to find those buckets that are within distance specified

Callers

nothing calls this directly

Calls 3

BuildLocatorMethod · 0.95
fill_nFunction · 0.85
ForFunction · 0.50

Tested by

no test coverage detected