VTK  9.2.6
vtkOverlappingCellsDetector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOverlappingCellsDetector.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 =========================================================================*/
50 #ifndef vtkOverlappingCellsDetector_h
51 #define vtkOverlappingCellsDetector_h
52 
53 #include "vtkFiltersParallelDIY2Module.h" // for export macros
55 
56 #include "vtkBoundingBox.h" // For DetectOverlappingCells
57 
58 #include <set> // For DetectOverlappingCells
59 #include <unordered_map> // For DetectOverlappingCells
60 #include <vector> // For DetectOverlappingCells
61 
62 class vtkDataSet;
64 class vtkPointSet;
65 
66 class VTKFILTERSPARALLELDIY2_EXPORT vtkOverlappingCellsDetector : public vtkPassInputTypeAlgorithm
67 {
68 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
74 
78  void SetController(vtkMultiProcessController*);
79  vtkGetObjectMacro(Controller, vtkMultiProcessController);
81 
83 
86  vtkGetMacro(Tolerance, double);
87  vtkSetMacro(Tolerance, double);
89 
91 
95  vtkGetStringMacro(NumberOfOverlapsPerCellArrayName);
96  vtkSetStringMacro(NumberOfOverlapsPerCellArrayName);
98 
99 protected:
101  ~vtkOverlappingCellsDetector() override;
102 
103  int FillInputPortInformation(int port, vtkInformation* info) override;
104 
106 
110  int ExposeOverlappingCellsAmongBlocks(std::vector<vtkPointSet*>& outputs);
111 
135  bool DetectOverlappingCells(vtkDataSet* queryCellDataSet, vtkPointSet* queryPointCloud,
136  const std::vector<vtkBoundingBox>& queryCellBoundingBoxes, vtkDataSet* cellDataSet,
137  vtkPointSet* pointCloud, const std::vector<vtkBoundingBox>& cellBoundingBoxes,
138  std::unordered_map<vtkIdType, std::set<vtkIdType>>& collisionListMap,
139  bool updateProgress = false);
140 
145 
150 
160  double Tolerance;
161 
162 private:
164  void operator=(const vtkOverlappingCellsDetector&) = delete;
165 };
166 
167 #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:62
concrete class for storing a set of points
Definition: vtkPointSet.h:69
int vtkIdType
Definition: vtkType.h:332
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:39
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.