VTK  9.1.0
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
66class vtkDataSet;
67class vtkPolyData;
68
69class VTKCOMMONDATAMODEL_EXPORT vtkLocator : public vtkObject
70{
71public:
73
76 vtkTypeMacro(vtkLocator, vtkObject);
77 void PrintSelf(ostream& os, vtkIndent indent) 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, vtkTypeBool);
115 vtkGetMacro(Automatic, vtkTypeBool);
116 vtkBooleanMacro(Automatic, vtkTypeBool);
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) override;
169 void UnRegister(vtkObjectBase* o) override;
171
172protected:
174 ~vtkLocator() override;
175
177 vtkTypeBool Automatic; // boolean controls automatic subdivision (or uses user spec.)
178 double Tolerance; // for performing merging
180 int Level;
181
182 vtkTimeStamp BuildTime; // time at which locator was built
183
185
186private:
187 vtkLocator(const vtkLocator&) = delete;
188 void operator=(const vtkLocator&) = delete;
189};
190
191#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:70
vtkTypeBool Automatic
Definition: vtkLocator.h:177
void Register(vtkObjectBase *o) override
Handle the PointSet <-> Locator loop.
vtkTimeStamp BuildTime
Definition: vtkLocator.h:182
~vtkLocator() override
virtual void Update()
Cause the locator to rebuild itself if it or its input dataset has changed.
double Tolerance
Definition: vtkLocator.h:178
virtual void SetDataSet(vtkDataSet *)
Build the locator from the points/cells defining this dataset.
void UnRegister(vtkObjectBase *o) override
Handle the PointSet <-> Locator loop.
virtual void Initialize()
Initialize locator.
int MaxLevel
Definition: vtkLocator.h:179
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
void ReportReferences(vtkGarbageCollector *) override
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
virtual void BuildLocator()=0
Build the locator from the input dataset.
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
vtkDataSet * DataSet
Definition: vtkLocator.h:176
abstract base class for most VTK objects
Definition: vtkObjectBase.h:70
abstract base class for most VTK objects
Definition: vtkObject.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
record modification and/or execution time
Definition: vtkTimeStamp.h:33
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155