VTK  9.1.0
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 =========================================================================*/
47 #ifndef vtkOverlappingCellsDetector_h
48 #define vtkOverlappingCellsDetector_h
49 
50 #include "vtkFiltersParallelDIY2Module.h" // for export macros
52 
53 #include "vtkBoundingBox.h" // For DetectOverlappingCells
54 
55 #include <set> // For DetectOverlappingCells
56 #include <unordered_map> // For DetectOverlappingCells
57 #include <vector> // For DetectOverlappingCells
58 
59 class vtkDataSet;
61 class vtkPointSet;
62 
63 class VTKFILTERSPARALLELDIY2_EXPORT vtkOverlappingCellsDetector : public vtkPassInputTypeAlgorithm
64 {
65 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
76  vtkGetObjectMacro(Controller, vtkMultiProcessController);
78 
80 
83  vtkGetMacro(Tolerance, double);
84  vtkSetMacro(Tolerance, double);
86 
88 
92  vtkGetStringMacro(NumberOfOverlapsPerCellArrayName);
93  vtkSetStringMacro(NumberOfOverlapsPerCellArrayName);
95 
96 protected:
99 
101 
103 
107  int ExposeOverlappingCellsAmongBlocks(std::vector<vtkPointSet*>& outputs);
108 
132  bool DetectOverlappingCells(vtkDataSet* queryCellDataSet, vtkPointSet* queryPointCloud,
133  const std::vector<vtkBoundingBox>& queryCellBoundingBoxes, vtkDataSet* cellDataSet,
134  vtkPointSet* pointCloud, const std::vector<vtkBoundingBox>& cellBoundingBoxes,
135  std::unordered_map<vtkIdType, std::set<vtkIdType>>& collisionListMap,
136  bool updateProgress = false);
137 
142 
147 
157  double Tolerance;
158 
159 private:
161  void operator=(const vtkOverlappingCellsDetector&) = delete;
162 };
163 
164 #endif
vtkOverlappingCellsDetector::NumberOfOverlapsPerCellArrayName
char * NumberOfOverlapsPerCellArrayName
Output cell scalar field counting the number of cells that each cell was found to collide.
Definition: vtkOverlappingCellsDetector.h:146
vtkPassInputTypeAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkOverlappingCellsDetector::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkOverlappingCellsDetector::Controller
vtkMultiProcessController * Controller
Local controller.
Definition: vtkOverlappingCellsDetector.h:141
vtkOverlappingCellsDetector::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOverlappingCellsDetector::Tolerance
double Tolerance
Tolerance for overlap detections.
Definition: vtkOverlappingCellsDetector.h:157
vtkOverlappingCellsDetector
Exposes how many cells each cell of the input collide.
Definition: vtkOverlappingCellsDetector.h:64
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkOverlappingCellsDetector::ExposeOverlappingCellsAmongBlocks
int ExposeOverlappingCellsAmongBlocks(std::vector< vtkPointSet * > &outputs)
Main pipeline.
vtkOverlappingCellsDetector::vtkOverlappingCellsDetector
vtkOverlappingCellsDetector()
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:77
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkOverlappingCellsDetector::~vtkOverlappingCellsDetector
~vtkOverlappingCellsDetector() override
vtkBoundingBox.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkOverlappingCellsDetector::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:106
vtkOverlappingCellsDetector::New
static vtkOverlappingCellsDetector * New()
vtkOverlappingCellsDetector::SetController
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:52
vtkOverlappingCellsDetector::DetectOverlappingCells
bool DetectOverlappingCells(vtkDataSet *queryCellDataSet, vtkPointSet *queryPointCloud, const std::vector< vtkBoundingBox > &queryCellBoundingBoxes, vtkDataSet *cellDataSet, vtkPointSet *pointCloud, const std::vector< vtkBoundingBox > &cellBoundingBoxes, std::unordered_map< vtkIdType, std::set< vtkIdType >> &collisionListMap, bool updateProgress=false)
Method performing the cell detection.