VTK
vtkLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLocator.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 =========================================================================*/
59 #ifndef vtkLocator_h
60 #define vtkLocator_h
61 
62 #include "vtkCommonDataModelModule.h" // For export macro
63 #include "vtkObject.h"
64 
65 class vtkDataSet;
66 class vtkPolyData;
67 
69 {
70 public:
72 
73  vtkTypeMacro(vtkLocator,vtkObject);
74  void PrintSelf(ostream& os, vtkIndent indent);
76 
78 
79  virtual void SetDataSet(vtkDataSet*);
80  vtkGetObjectMacro(DataSet,vtkDataSet);
82 
84 
87  vtkSetClampMacro(MaxLevel,int,0,VTK_INT_MAX);
88  vtkGetMacro(MaxLevel,int);
90 
92 
95  vtkGetMacro(Level,int);
97 
99 
103  vtkSetMacro(Automatic,int);
104  vtkGetMacro(Automatic,int);
105  vtkBooleanMacro(Automatic,int);
107 
109 
111  vtkSetClampMacro(Tolerance,double,0.0,VTK_DOUBLE_MAX);
112  vtkGetMacro(Tolerance,double);
114 
117  virtual void Update();
118 
120  virtual void Initialize();
121 
123  virtual void BuildLocator() = 0;
124 
126  virtual void FreeSearchStructure() = 0;
127 
132  virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
133 
135 
136  vtkGetMacro(BuildTime, unsigned long);
138 
140 
141  virtual void Register(vtkObjectBase *o);
142  virtual void UnRegister(vtkObjectBase *o);
144 
145 protected:
146  vtkLocator();
147  ~vtkLocator();
148 
150  int Automatic; // boolean controls automatic subdivision (or uses user spec.)
151  double Tolerance; // for performing merging
152  int MaxLevel;
153  int Level;
154 
155  vtkTimeStamp BuildTime; // time at which locator was built
156 
157  virtual void ReportReferences(vtkGarbageCollector*);
158 
159 private:
160  vtkLocator(const vtkLocator&); // Not implemented.
161  void operator=(const vtkLocator&); // Not implemented.
162 };
163 
164 #endif
vtkTimeStamp BuildTime
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void Register(vtkObjectBase *o)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:140
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
vtkDataSet * DataSet
Definition: vtkLocator.h:149
#define VTK_INT_MAX
Definition: vtkType.h:130
record modification and/or execution time
Definition: vtkTimeStamp.h:34
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:68
vtkTimeStamp BuildTime
Definition: vtkLocator.h:155
virtual void Update()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
Detect and break reference loops.
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void UnRegister(vtkObjectBase *o)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void ReportReferences(vtkGarbageCollector *)
abstract base class for most VTK objects
Definition: vtkObjectBase.h:59
int MaxLevel
Definition: vtkLocator.h:152
int Automatic
Definition: vtkLocator.h:150
double Tolerance
Definition: vtkLocator.h:151
#define VTKCOMMONDATAMODEL_EXPORT