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 =========================================================================*/
79 #ifndef vtkLocator_h
80 #define vtkLocator_h
81 
82 #include "vtkCommonDataModelModule.h" // For export macro
83 #include "vtkObject.h"
84 
85 class vtkDataSet;
86 class vtkPolyData;
87 
88 class VTKCOMMONDATAMODEL_EXPORT vtkLocator : public vtkObject
89 {
90 public:
92 
95  vtkTypeMacro(vtkLocator, vtkObject);
96  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
100 
103  virtual void SetDataSet(vtkDataSet*);
104  vtkGetObjectMacro(DataSet, vtkDataSet);
106 
108 
113  vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX);
114  vtkGetMacro(MaxLevel, int);
116 
118 
123  vtkGetMacro(Level, int);
125 
127 
133  vtkSetMacro(Automatic, vtkTypeBool);
134  vtkGetMacro(Automatic, vtkTypeBool);
135  vtkBooleanMacro(Automatic, vtkTypeBool);
137 
139 
143  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
144  vtkGetMacro(Tolerance, double);
146 
151  virtual void Update();
152 
156  virtual void Initialize();
157 
161  virtual void BuildLocator() = 0;
162 
166  virtual void FreeSearchStructure() = 0;
167 
174  virtual void GenerateRepresentation(int level, vtkPolyData* pd) = 0;
175 
177 
180  vtkGetMacro(BuildTime, vtkMTimeType);
182 
184 
187  void Register(vtkObjectBase* o) override;
188  void UnRegister(vtkObjectBase* o) override;
190 
191 protected:
193  ~vtkLocator() override;
194 
196  vtkTypeBool Automatic; // boolean controls automatic subdivision (or uses user spec.)
197  double Tolerance; // for performing merging
198  int MaxLevel;
199  int Level;
200 
201  vtkTimeStamp BuildTime; // time at which locator was built
202 
204 
205 private:
206  vtkLocator(const vtkLocator&) = delete;
207  void operator=(const vtkLocator&) = delete;
208 };
209 
210 #endif
vtkLocator::Register
void Register(vtkObjectBase *o) override
Handle the PointSet <-> Locator loop.
vtx::types::DataSet
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkLocator::SetDataSet
virtual void SetDataSet(vtkDataSet *)
Build the locator from the points/cells defining this dataset.
vtkLocator::~vtkLocator
~vtkLocator() override
vtkLocator::Automatic
vtkTypeBool Automatic
Definition: vtkLocator.h:196
vtkLocator::MaxLevel
int MaxLevel
Definition: vtkLocator.h:198
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkLocator::UnRegister
void UnRegister(vtkObjectBase *o) override
Handle the PointSet <-> Locator loop.
vtkLocator::vtkLocator
vtkLocator()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkLocator::Update
virtual void Update()
Cause the locator to rebuild itself if it or its input dataset has changed.
vtkLocator
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:89
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkLocator::Initialize
virtual void Initialize()
Initialize locator.
vtkLocator::Level
int Level
Definition: vtkLocator.h:199
vtkLocator::Tolerance
double Tolerance
Definition: vtkLocator.h:197
vtkLocator::ReportReferences
void ReportReferences(vtkGarbageCollector *) override
vtkLocator::GenerateRepresentation
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
vtkObjectBase
abstract base class for most VTK objects
Definition: vtkObjectBase.h:70
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkLocator::BuildLocator
virtual void BuildLocator()=0
Build the locator from the input dataset.
vtkLocator::DataSet
vtkDataSet * DataSet
Definition: vtkLocator.h:195
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:95
vtkObject.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkLocator::BuildTime
vtkTimeStamp BuildTime
Definition: vtkLocator.h:201
vtkLocator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkLocator::FreeSearchStructure
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287