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:
46  void PrintSelf(ostream &os, vtkIndent indent);
47 
52 
62  void Merge(vtkSMPMergePoints* locator,
63  vtkIdType idx,
64  vtkPointData *outPd,
65  vtkPointData *inPd,
66  vtkIdList* idList);
67 
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:
112 
114 
115 private:
116  vtkSMPMergePoints(const vtkSMPMergePoints&) VTK_DELETE_FUNCTION;
117  void operator=(const vtkSMPMergePoints&) VTK_DELETE_FUNCTION;
118 };
119 
120 #endif // vtkSMPMergePoints_h
list of point or cell ids
Definition: vtkIdList.h:37
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
Definition: vtkIdList.h:56
a simple class to control print indentation
Definition: vtkIndent.h:40
merge exactly coincident points
represent and manipulate point attribute data
Definition: vtkPointData.h:38
Class designed to help with merging of points in parallel.
vtkIdType GetMaxId()
Returns the biggest id in the locator.
void FixSizeOfPointArray()
At the of the merge, this can be called to set the MaxId of the points array to the maximum id in the...
vtkIdType GetNumberOfIdsInBucket(vtkIdType idx)
Retuns the number of points in a bin.
vtkAtomicIdType AtomicInsertionId
void InitializeMerge()
This should be called from 1 thread before any call to Merge.
vtkIdType GetNumberOfBuckets()
Retuns the number of bins.
static vtkSMPMergePoints * New()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void Merge(vtkSMPMergePoints *locator, vtkIdType idx, vtkPointData *outPd, vtkPointData *inPd, vtkIdList *idList)
Merge the points of one of the bins from the given locator to the same bin of the current locator.
vtkAtomic< vtkIdType > vtkAtomicIdType
int vtkIdType
Definition: vtkType.h:287