VTK  9.2.6
vtkFindCellStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFindCellStrategy.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 =========================================================================*/
48 #ifndef vtkFindCellStrategy_h
49 #define vtkFindCellStrategy_h
50 
51 #include "vtkCommonDataModelModule.h" // For export macro
52 #include "vtkObject.h"
53 
54 class vtkCell;
55 class vtkGenericCell;
56 class vtkPointSet;
57 
58 class VTKCOMMONDATAMODEL_EXPORT vtkFindCellStrategy : public vtkObject
59 {
60 public:
62 
66  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
76  virtual int Initialize(vtkPointSet* ps);
77 
86  virtual vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
87  double tol2, int& subId, double pcoords[3], double* weights) = 0;
88 
105  virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3],
106  vtkGenericCell* cell, vtkIdType& cellId, int& subId, double& dist2, int& inside) = 0;
107 
111  virtual bool InsideCellBounds(double x[3], vtkIdType cellId) = 0;
112 
119  virtual void CopyParameters(vtkFindCellStrategy* from);
120 
121 protected:
123  ~vtkFindCellStrategy() override;
124 
125  // You may ask why this OwnsLocator rigamarole. The reason is that the reference counting garbage
126  // collector gets confused when the (cell/point) locator, point set, and strategy are all mixed
127  // together; resulting in memory leaks etc, So this defines if the locator specified or taken from
128  // another strategy instance or the dataset.
130  vtkPointSet* PointSet; // vtkPointSet which this strategy is associated with
131  double Bounds[6]; // bounding box of vtkPointSet
132 
133  vtkTimeStamp InitializeTime; // time at which strategy was initialized
134 
135 private:
136  vtkFindCellStrategy(const vtkFindCellStrategy&) = delete;
137  void operator=(const vtkFindCellStrategy&) = delete;
138 };
139 
140 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
concrete class for storing a set of points
Definition: vtkPointSet.h:69
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