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 "vtkLocator.h"
42 
43 class vtkCellArray;
44 class vtkGenericCell;
45 class vtkIdList;
46 class vtkPoints;
47 
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
59  vtkSetClampMacro(NumberOfCellsPerNode,int,1,VTK_LARGE_INTEGER);
60  vtkGetMacro(NumberOfCellsPerNode,int);
62 
64 
69  vtkSetMacro(CacheCellBounds,int);
70  vtkGetMacro(CacheCellBounds,int);
71  vtkBooleanMacro(CacheCellBounds,int);
73 
75 
79  vtkSetMacro(RetainCellLists,int);
80  vtkGetMacro(RetainCellLists,int);
81  vtkBooleanMacro(RetainCellLists,int);
83 
85 
89  vtkSetMacro(LazyEvaluation,int);
90  vtkGetMacro(LazyEvaluation,int);
91  vtkBooleanMacro(LazyEvaluation,int);
93 
95 
99  vtkSetMacro(UseExistingSearchStructure,int);
100  vtkGetMacro(UseExistingSearchStructure,int);
101  vtkBooleanMacro(UseExistingSearchStructure,int);
103 
105 
107  virtual int IntersectWithLine(
108  double p1[3], double p2[3], double tol, double& t, double x[3],
109  double pcoords[3], int &subId);
111 
113 
115  virtual int IntersectWithLine(
116  double p1[3], double p2[3], double tol, double& t, double x[3],
117  double pcoords[3], int &subId, vtkIdType &cellId);
119 
121 
124  virtual int IntersectWithLine(
125  double p1[3], double p2[3], double tol, double& t, double x[3],
126  double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell);
128 
130 
139  virtual int IntersectWithLine(
140  const double p1[3], const double p2[3],
141  vtkPoints *points, vtkIdList *cellIds);
143 
145 
148  virtual void FindClosestPoint(
149  double x[3], double closestPoint[3],
150  vtkIdType &cellId, int &subId, double& dist2);
152 
154 
163  virtual void FindClosestPoint(
164  double x[3], double closestPoint[3],
165  vtkGenericCell *cell, vtkIdType &cellId,
166  int &subId, double& dist2);
168 
170 
176  virtual vtkIdType FindClosestPointWithinRadius(
177  double x[3], double radius,
178  double closestPoint[3], vtkIdType &cellId,
179  int &subId, double& dist2);
181 
183 
196  virtual vtkIdType FindClosestPointWithinRadius(
197  double x[3], double radius,
198  double closestPoint[3],
199  vtkGenericCell *cell, vtkIdType &cellId,
200  int &subId, double& dist2);
202 
204 
219  virtual vtkIdType FindClosestPointWithinRadius(
220  double x[3], double radius,
221  double closestPoint[3],
222  vtkGenericCell *cell, vtkIdType &cellId,
223  int &subId, double& dist2, int &inside);
225 
229  virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells);
230 
232 
237  virtual void FindCellsAlongLine(
238  double p1[3], double p2[3], double tolerance, vtkIdList *cells);
240 
243  virtual vtkIdType FindCell(double x[3]);
244 
246 
249  virtual vtkIdType FindCell(
250  double x[3], double tol2, vtkGenericCell *GenCell,
251  double pcoords[3], double *weights);
253 
257  virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID);
258 
259 protected:
262 
264 
269  virtual bool StoreCellBounds();
270  virtual void FreeCellBounds();
272 
279 //BTX - begin tcl exclude
280  double (*CellBounds)[6];
281 //ETX - end tcl exclude
282 
283 private:
284  vtkAbstractCellLocator(const vtkAbstractCellLocator&); // Not implemented.
285  void operator=(const vtkAbstractCellLocator&); // Not implemented.
286 };
287 
288 #endif
289 
290 
#define VTK_FILTERING_EXPORT
an abstract base class for locators which find cells
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:60
void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Definition: vtkType.h:255
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
object to represent cell connectivity
Definition: vtkCellArray.h:48
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
represent and manipulate 3D points
Definition: vtkPoints.h:38