VTK  9.2.6
vtkCellLocatorStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCellLocatorStrategy.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 =========================================================================*/
31 #ifndef vtkCellLocatorStrategy_h
32 #define vtkCellLocatorStrategy_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkFindCellStrategy.h"
36 
38 
39 class VTKCOMMONDATAMODEL_EXPORT vtkCellLocatorStrategy : public vtkFindCellStrategy
40 {
41 public:
45  static vtkCellLocatorStrategy* New();
46 
48 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
59  int Initialize(vtkPointSet* ps) override;
60 
64  vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
65  double tol2, int& subId, double pcoords[3], double* weights) override;
66 
70  vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3],
71  vtkGenericCell* cell, vtkIdType& cellId, int& subId, double& dist2, int& inside) override;
72 
76  bool InsideCellBounds(double x[3], vtkIdType cellId) override;
77 
79 
84  virtual void SetCellLocator(vtkAbstractCellLocator*);
85  vtkGetObjectMacro(CellLocator, vtkAbstractCellLocator);
87 
94  void CopyParameters(vtkFindCellStrategy* from) override;
95 
96 protected:
98  ~vtkCellLocatorStrategy() override;
99 
101 
102 private:
104  void operator=(const vtkCellLocatorStrategy&) = delete;
105 };
106 
107 #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:69
virtual int Initialize(vtkPointSet *ps)
All subclasses of this class must provide an initialize method.
int vtkIdType
Definition: vtkType.h:332
provides thread-safe access to cells
helper class to manage the vtkPointSet::FindCell() METHOD
abstract class to specify cell behavior
Definition: vtkCell.h:60
a simple class to control print indentation
Definition: vtkIndent.h:39
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 ...