VTK
vtkSMPMergePoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSMPMergePoints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkSMPMergePoints_h
32 #define vtkSMPMergePoints_h
33 
34 #include "vtkFiltersSMPModule.h" // For export macro
35 #include "vtkMergePoints.h"
36 #include "vtkIdList.h" // For inline functions
37 #include "vtkAtomicTypes.h" // For the atomic integer used in Merge()
38 
39 class vtkPointData;
40 
41 class VTKFILTERSSMP_EXPORT vtkSMPMergePoints : public vtkMergePoints
42 {
43 public:
45  static vtkSMPMergePoints* New();
46  void PrintSelf(ostream &os, vtkIndent indent) override;
47 
51  void InitializeMerge();
52 
62  void Merge(vtkSMPMergePoints* locator,
63  vtkIdType idx,
64  vtkPointData *outPd,
65  vtkPointData *inPd,
66  vtkIdList* idList);
67 
76  void FixSizeOfPointArray();
77 
82  {
83  return this->AtomicInsertionId - 1;
84  }
85 
87 
91  {
92  if ( !this->HashTable )
93  {
94  return 0;
95  }
96  vtkIdList* bucket = this->HashTable[idx];
97  return bucket ? bucket->GetNumberOfIds() : 0;
98  }
100 
105  {
106  return this->NumberOfBuckets;
107  }
108 
109 protected:
111  ~vtkSMPMergePoints() override;
112 
114 
115 private:
116  vtkSMPMergePoints(const vtkSMPMergePoints&) = delete;
117  void operator=(const vtkSMPMergePoints&) = delete;
118 };
119 
120 #endif // vtkSMPMergePoints_h
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkAtomicIdType AtomicInsertionId
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
Definition: vtkIdList.h:63
Class designed to help with merging of points in parallel.
int vtkIdType
Definition: vtkType.h:347
vtkIdType GetNumberOfBuckets() override
Returns the number of bins.
a simple class to control print indentation
Definition: vtkIndent.h:39
merge exactly coincident points
list of point or cell ids
Definition: vtkIdList.h:36
vtkIdType GetNumberOfIdsInBucket(vtkIdType idx)
Returns the number of points in a bin.
static vtkMergePoints * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
vtkAtomic< vtkIdType > vtkAtomicIdType
vtkIdType GetMaxId()
Returns the biggest id in the locator.