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 =========================================================================*/
60 #ifndef vtkLocator_h
61 #define vtkLocator_h
62 
63 #include "vtkCommonDataModelModule.h" // For export macro
64 #include "vtkObject.h"
65 
66 class vtkDataSet;
67 class vtkPolyData;
68 
69 class VTKCOMMONDATAMODEL_EXPORT vtkLocator : public vtkObject
70 {
71 public:
73 
76  vtkTypeMacro(vtkLocator,vtkObject);
77  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
79 
81 
84  virtual void SetDataSet(vtkDataSet*);
85  vtkGetObjectMacro(DataSet,vtkDataSet);
87 
89 
94  vtkSetClampMacro(MaxLevel,int,0,VTK_INT_MAX);
95  vtkGetMacro(MaxLevel,int);
97 
99 
104  vtkGetMacro(Level,int);
106 
108 
114  vtkSetMacro(Automatic,int);
115  vtkGetMacro(Automatic,int);
116  vtkBooleanMacro(Automatic,int);
118 
120 
124  vtkSetClampMacro(Tolerance,double,0.0,VTK_DOUBLE_MAX);
125  vtkGetMacro(Tolerance,double);
127 
132  virtual void Update();
133 
137  virtual void Initialize();
138 
142  virtual void BuildLocator() = 0;
143 
147  virtual void FreeSearchStructure() = 0;
148 
155  virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
156 
158 
161  vtkGetMacro(BuildTime, vtkMTimeType);
163 
165 
168  void Register(vtkObjectBase *o) VTK_OVERRIDE;
169  void UnRegister(vtkObjectBase *o) VTK_OVERRIDE;
171 
172 protected:
173  vtkLocator();
174  ~vtkLocator() VTK_OVERRIDE;
175 
176  vtkDataSet *DataSet;
177  int Automatic; // boolean controls automatic subdivision (or uses user spec.)
178  double Tolerance; // for performing merging
179  int MaxLevel;
180  int Level;
181 
182  vtkTimeStamp BuildTime; // time at which locator was built
183 
184  void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
185 
186 private:
187  vtkLocator(const vtkLocator&) VTK_DELETE_FUNCTION;
188  void operator=(const vtkLocator&) VTK_DELETE_FUNCTION;
189 };
190 
191 #endif
vtkTimeStamp BuildTime
abstract base class for most VTK objects
Definition: vtkObject.h:59
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
#define VTK_INT_MAX
Definition: vtkType.h:153
record modification and/or execution time
Definition: vtkTimeStamp.h:35
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:69
virtual void Update()
Updates the extensions string.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
Detect and break reference loops.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract base class for most VTK objects
Definition: vtkObjectBase.h:65
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.