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=========================================================================*/
49
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
62class vtkDataSet;
64class vtkPointSet;
65
66class VTKFILTERSPARALLELDIY2_EXPORT vtkOverlappingCellsDetector : public vtkPassInputTypeAlgorithm
67{
68public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
74
81
83
86 vtkGetMacro(Tolerance, double);
87 vtkSetMacro(Tolerance, double);
89
91
98
99protected:
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
162private:
164 void operator=(const vtkOverlappingCellsDetector&) = delete;
165};
166
167#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
a simple class to control print indentation
Definition vtkIndent.h:40
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:70
int vtkIdType
Definition vtkType.h:332