VTK  9.3.1
vtkOverlappingCellsDetector.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
38 #ifndef vtkOverlappingCellsDetector_h
39 #define vtkOverlappingCellsDetector_h
40 
41 #include "vtkFiltersParallelDIY2Module.h" // for export macros
43 
44 #include "vtkBoundingBox.h" // For DetectOverlappingCells
45 
46 #include <set> // For DetectOverlappingCells
47 #include <unordered_map> // For DetectOverlappingCells
48 #include <vector> // For DetectOverlappingCells
49 
50 VTK_ABI_NAMESPACE_BEGIN
51 class vtkDataSet;
53 class vtkPointSet;
54 
55 class VTKFILTERSPARALLELDIY2_EXPORT vtkOverlappingCellsDetector : public vtkPassInputTypeAlgorithm
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
63 
67  void SetController(vtkMultiProcessController*);
68  vtkGetObjectMacro(Controller, vtkMultiProcessController);
70 
72 
75  vtkGetMacro(Tolerance, double);
76  vtkSetMacro(Tolerance, double);
78 
80 
84  vtkGetStringMacro(NumberOfOverlapsPerCellArrayName);
85  vtkSetStringMacro(NumberOfOverlapsPerCellArrayName);
87 
88 protected:
90  ~vtkOverlappingCellsDetector() override;
91 
93 
95 
99  int ExposeOverlappingCellsAmongBlocks(std::vector<vtkPointSet*>& outputs);
100 
124  bool DetectOverlappingCells(vtkDataSet* queryCellDataSet, vtkPointSet* queryPointCloud,
125  const std::vector<vtkBoundingBox>& queryCellBoundingBoxes, vtkDataSet* cellDataSet,
126  vtkPointSet* pointCloud, const std::vector<vtkBoundingBox>& cellBoundingBoxes,
127  std::unordered_map<vtkIdType, std::set<vtkIdType>>& collisionListMap,
128  bool updateProgress = false);
129 
134 
139 
149  double Tolerance;
150 
151 private:
153  void operator=(const vtkOverlappingCellsDetector&) = delete;
154 };
155 
156 VTK_ABI_NAMESPACE_END
157 #endif
vtkMultiProcessController * Controller
Local controller.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
concrete class for storing a set of points
Definition: vtkPointSet.h:58
int vtkIdType
Definition: vtkType.h:315
Exposes how many cells each cell of the input collide.
double Tolerance
Tolerance for overlap detections.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
char * NumberOfOverlapsPerCellArrayName
Output cell scalar field counting the number of cells that each cell was found to collide...
Store zero or more vtkInformation instances.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
Multiprocessing communication superclass.