VTK  9.3.1
vtkCellLocatorStrategy.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
19 #ifndef vtkCellLocatorStrategy_h
20 #define vtkCellLocatorStrategy_h
21 
22 #include "vtkCommonDataModelModule.h" // For export macro
23 #include "vtkFindCellStrategy.h"
24 
25 VTK_ABI_NAMESPACE_BEGIN
27 
28 class VTKCOMMONDATAMODEL_EXPORT vtkCellLocatorStrategy : public vtkFindCellStrategy
29 {
30 public:
34  static vtkCellLocatorStrategy* New();
35 
37 
41  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
48  int Initialize(vtkPointSet* ps) override;
49 
53  vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
54  double tol2, int& subId, double pcoords[3], double* weights) override;
55 
59  vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3],
60  vtkGenericCell* cell, vtkIdType& cellId, int& subId, double& dist2, int& inside) override;
61 
65  bool InsideCellBounds(double x[3], vtkIdType cellId) override;
66 
68 
73  virtual void SetCellLocator(vtkAbstractCellLocator*);
74  vtkGetObjectMacro(CellLocator, vtkAbstractCellLocator);
76 
83  void CopyParameters(vtkFindCellStrategy* from) override;
84 
85 protected:
87  ~vtkCellLocatorStrategy() override;
88 
90 
91 private:
93  void operator=(const vtkCellLocatorStrategy&) = delete;
94 };
95 
96 VTK_ABI_NAMESPACE_END
97 #endif
virtual bool InsideCellBounds(double x[3], vtkIdType cellId)=0
Quickly test if a point is inside the bounds of a particular cell.
vtkAbstractCellLocator * CellLocator
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2, int &inside)=0
Return the closest point within a specified radius and the cell which is closest to the point x...
virtual void CopyParameters(vtkFindCellStrategy *from)
Copy essential parameters between instances of this class.
an abstract base class for locators which find cells
concrete class for storing a set of points
Definition: vtkPointSet.h:58
virtual int Initialize(vtkPointSet *ps)
All subclasses of this class must provide an initialize method.
int vtkIdType
Definition: vtkType.h:315
provides thread-safe access to cells
helper class to manage the vtkPointSet::FindCell() METHOD
abstract class to specify cell behavior
Definition: vtkCell.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)=0
Virtual method for finding a cell.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
implement a specific vtkPointSet::FindCell() strategy based on using a cell locator ...