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 =========================================================================*/
38 #ifndef vtkAbstractCellLocator_h
39 #define vtkAbstractCellLocator_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkLocator.h"
43 
44 class vtkCellArray;
45 class vtkGenericCell;
46 class vtkIdList;
47 class vtkPoints;
48 
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
60  vtkSetClampMacro(NumberOfCellsPerNode,int,1,VTK_INT_MAX);
61  vtkGetMacro(NumberOfCellsPerNode,int);
63 
65 
70  vtkSetMacro(CacheCellBounds,int);
71  vtkGetMacro(CacheCellBounds,int);
72  vtkBooleanMacro(CacheCellBounds,int);
74 
76 
80  vtkSetMacro(RetainCellLists,int);
81  vtkGetMacro(RetainCellLists,int);
82  vtkBooleanMacro(RetainCellLists,int);
84 
86 
90  vtkSetMacro(LazyEvaluation,int);
91  vtkGetMacro(LazyEvaluation,int);
92  vtkBooleanMacro(LazyEvaluation,int);
94 
96 
100  vtkSetMacro(UseExistingSearchStructure,int);
101  vtkGetMacro(UseExistingSearchStructure,int);
102  vtkBooleanMacro(UseExistingSearchStructure,int);
104 
106 
108  virtual int IntersectWithLine(
109  double p1[3], double p2[3], double tol, double& t, double x[3],
110  double pcoords[3], int &subId);
112 
114 
116  virtual int IntersectWithLine(
117  double p1[3], double p2[3], double tol, double& t, double x[3],
118  double pcoords[3], int &subId, vtkIdType &cellId);
120 
122 
125  virtual int IntersectWithLine(
126  double p1[3], double p2[3], double tol, double& t, double x[3],
127  double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell);
129 
131 
140  virtual int IntersectWithLine(
141  const double p1[3], const double p2[3],
142  vtkPoints *points, vtkIdList *cellIds);
144 
146 
149  virtual void FindClosestPoint(
150  double x[3], double closestPoint[3],
151  vtkIdType &cellId, int &subId, double& dist2);
153 
155 
164  virtual void FindClosestPoint(
165  double x[3], double closestPoint[3],
166  vtkGenericCell *cell, vtkIdType &cellId,
167  int &subId, double& dist2);
169 
171 
177  virtual vtkIdType FindClosestPointWithinRadius(
178  double x[3], double radius,
179  double closestPoint[3], vtkIdType &cellId,
180  int &subId, double& dist2);
182 
184 
197  virtual vtkIdType FindClosestPointWithinRadius(
198  double x[3], double radius,
199  double closestPoint[3],
200  vtkGenericCell *cell, vtkIdType &cellId,
201  int &subId, double& dist2);
203 
205 
220  virtual vtkIdType FindClosestPointWithinRadius(
221  double x[3], double radius,
222  double closestPoint[3],
223  vtkGenericCell *cell, vtkIdType &cellId,
224  int &subId, double& dist2, int &inside);
226 
230  virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells);
231 
233 
238  virtual void FindCellsAlongLine(
239  double p1[3], double p2[3], double tolerance, vtkIdList *cells);
241 
244  virtual vtkIdType FindCell(double x[3]);
245 
247 
250  virtual vtkIdType FindCell(
251  double x[3], double tol2, vtkGenericCell *GenCell,
252  double pcoords[3], double *weights);
254 
258  virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID);
259 
260 protected:
263 
265 
270  virtual bool StoreCellBounds();
271  virtual void FreeCellBounds();
273 
280 //BTX - begin tcl exclude
281  double (*CellBounds)[6];
282 //ETX - end tcl exclude
283 
284 private:
285  vtkAbstractCellLocator(const vtkAbstractCellLocator&); // Not implemented.
286  void operator=(const vtkAbstractCellLocator&); // Not implemented.
287 };
288 
289 #endif
290 
291 
#define VTK_INT_MAX
Definition: vtkType.h:130
an abstract base class for locators which find cells
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:68
void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Definition: vtkType.h:247
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
object to represent cell connectivity
Definition: vtkCellArray.h:49
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38