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 =========================================================================*/
52 #ifndef vtkLocator_h
53 #define vtkLocator_h
54 
55 #include "vtkCommonDataModelModule.h" // For export macro
56 #include "vtkObject.h"
57 
58 class vtkDataSet;
59 class vtkPolyData;
60 
62 {
63 public:
64  vtkTypeMacro(vtkLocator,vtkObject);
65  void PrintSelf(ostream& os, vtkIndent indent);
66 
68 
69  virtual void SetDataSet(vtkDataSet*);
70  vtkGetObjectMacro(DataSet,vtkDataSet);
72 
74 
77  vtkSetClampMacro(MaxLevel,int,0,VTK_INT_MAX);
78  vtkGetMacro(MaxLevel,int);
80 
82 
85  vtkGetMacro(Level,int);
87 
89 
93  vtkSetMacro(Automatic,int);
94  vtkGetMacro(Automatic,int);
95  vtkBooleanMacro(Automatic,int);
97 
99 
101  vtkSetClampMacro(Tolerance,double,0.0,VTK_DOUBLE_MAX);
102  vtkGetMacro(Tolerance,double);
104 
107  virtual void Update();
108 
110  virtual void Initialize();
111 
113  virtual void BuildLocator() = 0;
114 
116  virtual void FreeSearchStructure() = 0;
117 
122  virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
123 
125 
126  vtkGetMacro(BuildTime, unsigned long);
128 
130 
131  virtual void Register(vtkObjectBase *o);
132  virtual void UnRegister(vtkObjectBase *o);
133 protected:
134  vtkLocator();
135  ~vtkLocator();
137 
139  int Automatic; // boolean controls automatic subdivision (or uses user spec.)
140  double Tolerance; // for performing merging
141  int MaxLevel;
142  int Level;
143 
144  vtkTimeStamp BuildTime; // time at which locator was built
145 
146  virtual void ReportReferences(vtkGarbageCollector*);
147 private:
148  vtkLocator(const vtkLocator&); // Not implemented.
149  void operator=(const vtkLocator&); // Not implemented.
150 };
151 
152 #endif
153 
154 
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:142
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
vtkDataSet * DataSet
Definition: vtkLocator.h:138
#define VTK_INT_MAX
Definition: vtkType.h:132
record modification and/or execution time
Definition: vtkTimeStamp.h:34
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:61
vtkTimeStamp BuildTime
Definition: vtkLocator.h:144
virtual void Update()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
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:141
int Automatic
Definition: vtkLocator.h:139
double Tolerance
Definition: vtkLocator.h:140
#define VTKCOMMONDATAMODEL_EXPORT