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=========================================================================*/
46
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
59class vtkDataSet;
61class vtkPointSet;
62
63class VTKFILTERSPARALLELDIY2_EXPORT vtkOverlappingCellsDetector : public vtkPassInputTypeAlgorithm
64{
65public:
68 void PrintSelf(ostream& os, vtkIndent indent) override;
69
71
78
80
83 vtkGetMacro(Tolerance, double);
84 vtkSetMacro(Tolerance, double);
86
88
95
96protected:
99
100 int FillInputPortInformation(int port, vtkInformation* info) override;
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
159private:
161 void operator=(const vtkOverlappingCellsDetector&) = delete;
162};
163
164#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkOverlappingCellsDetector() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
double Tolerance
Tolerance for overlap detections.
int ExposeOverlappingCellsAmongBlocks(std::vector< vtkPointSet * > &outputs)
Main pipeline.
static vtkOverlappingCellsDetector * New()
vtkMultiProcessController * Controller
Local controller.
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
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.
char * NumberOfOverlapsPerCellArrayName
Output cell scalar field counting the number of cells that each cell was found to collide.
concrete class for storing a set of points
Definition vtkPointSet.h:67
int vtkIdType
Definition vtkType.h:332