VTK
vtkAbstractCellLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractCellLocator.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 =========================================================================*/
37 #ifndef vtkAbstractCellLocator_h
38 #define vtkAbstractCellLocator_h
39 
40 #include "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkLocator.h"
42 
43 class vtkCellArray;
44 class vtkGenericCell;
45 class vtkIdList;
46 class vtkPoints;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractCellLocator : public vtkLocator
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
53 
55 
61  vtkSetClampMacro(NumberOfCellsPerNode,int,1,VTK_INT_MAX);
62  vtkGetMacro(NumberOfCellsPerNode,int);
64 
66 
73  vtkSetMacro(CacheCellBounds,int);
74  vtkGetMacro(CacheCellBounds,int);
75  vtkBooleanMacro(CacheCellBounds,int);
77 
79 
84  vtkSetMacro(RetainCellLists,int);
85  vtkGetMacro(RetainCellLists,int);
86  vtkBooleanMacro(RetainCellLists,int);
88 
90 
96  vtkSetMacro(LazyEvaluation,int);
97  vtkGetMacro(LazyEvaluation,int);
98  vtkBooleanMacro(LazyEvaluation,int);
100 
102 
109  vtkSetMacro(UseExistingSearchStructure,int);
110  vtkGetMacro(UseExistingSearchStructure,int);
111  vtkBooleanMacro(UseExistingSearchStructure,int);
113 
118  virtual int IntersectWithLine(
119  double p1[3], double p2[3], double tol, double& t, double x[3],
120  double pcoords[3], int &subId);
121 
126  virtual int IntersectWithLine(
127  double p1[3], double p2[3], double tol, double& t, double x[3],
128  double pcoords[3], int &subId, vtkIdType &cellId);
129 
134  virtual int IntersectWithLine(
135  double p1[3], double p2[3], double tol, double& t, double x[3],
136  double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell);
137 
150  virtual int IntersectWithLine(
151  const double p1[3], const double p2[3],
152  vtkPoints *points, vtkIdList *cellIds);
153 
159  virtual void FindClosestPoint(
160  double x[3], double closestPoint[3],
161  vtkIdType &cellId, int &subId, double& dist2);
162 
174  virtual void FindClosestPoint(
175  double x[3], double closestPoint[3],
176  vtkGenericCell *cell, vtkIdType &cellId,
177  int &subId, double& dist2);
178 
187  virtual vtkIdType FindClosestPointWithinRadius(
188  double x[3], double radius,
189  double closestPoint[3], vtkIdType &cellId,
190  int &subId, double& dist2);
191 
206  virtual vtkIdType FindClosestPointWithinRadius(
207  double x[3], double radius,
208  double closestPoint[3],
209  vtkGenericCell *cell, vtkIdType &cellId,
210  int &subId, double& dist2);
211 
228  virtual vtkIdType FindClosestPointWithinRadius(
229  double x[3], double radius,
230  double closestPoint[3],
231  vtkGenericCell *cell, vtkIdType &cellId,
232  int &subId, double& dist2, int &inside);
233 
239  virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells);
240 
248  virtual void FindCellsAlongLine(
249  double p1[3], double p2[3], double tolerance, vtkIdList *cells);
250 
255  virtual vtkIdType FindCell(double x[3]);
256 
262  virtual vtkIdType FindCell(
263  double x[3], double tol2, vtkGenericCell *GenCell,
264  double pcoords[3], double *weights);
265 
271  virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID);
272 
273 protected:
275  ~vtkAbstractCellLocator() VTK_OVERRIDE;
276 
278 
285  virtual bool StoreCellBounds();
286  virtual void FreeCellBounds();
288 
289  int NumberOfCellsPerNode;
290  int RetainCellLists;
291  int CacheCellBounds;
292  int LazyEvaluation;
293  int UseExistingSearchStructure;
294  vtkGenericCell *GenericCell;
295  double (*CellBounds)[6];
296 
297 private:
298  vtkAbstractCellLocator(const vtkAbstractCellLocator&) VTK_DELETE_FUNCTION;
299  void operator=(const vtkAbstractCellLocator&) VTK_DELETE_FUNCTION;
300 };
301 
302 #endif
303 
304 
#define VTK_INT_MAX
Definition: vtkType.h:153
an abstract base class for locators which find cells
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
int vtkIdType
Definition: vtkType.h:287
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:39