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
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkAbstractPointLocator::NumberOfBuckets
vtkIdType NumberOfBuckets
Definition: vtkAbstractPointLocator.h:120
vtkSMPMergePoints::GetNumberOfBuckets
vtkIdType GetNumberOfBuckets() override
Returns the number of bins.
Definition: vtkSMPMergePoints.h:104
vtkSMPMergePoints::AtomicInsertionId
vtkAtomicIdType AtomicInsertionId
Definition: vtkSMPMergePoints.h:113
vtkSMPMergePoints::GetNumberOfIdsInBucket
vtkIdType GetNumberOfIdsInBucket(vtkIdType idx)
Returns the number of points in a bin.
Definition: vtkSMPMergePoints.h:90
vtkMergePoints.h
vtkAtomicIdType
vtkAtomic< vtkIdType > vtkAtomicIdType
Definition: vtkAtomicTypes.h:25
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkMergePoints::New
static vtkMergePoints * New()
vtkMergePoints::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSMPMergePoints::GetMaxId
vtkIdType GetMaxId()
Returns the biggest id in the locator.
Definition: vtkSMPMergePoints.h:81
vtkAtomicTypes.h
vtkIdList::GetNumberOfIds
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
Definition: vtkIdList.h:63
vtkSMPMergePoints
Class designed to help with merging of points in parallel.
Definition: vtkSMPMergePoints.h:41
vtkIdList.h
vtkMergePoints
merge exactly coincident points
Definition: vtkMergePoints.h:36