VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkLocator.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00052 #ifndef __vtkLocator_h 00053 #define __vtkLocator_h 00054 00055 #include "vtkCommonDataModelModule.h" // For export macro 00056 #include "vtkObject.h" 00057 00058 class vtkDataSet; 00059 class vtkPolyData; 00060 00061 class VTKCOMMONDATAMODEL_EXPORT vtkLocator : public vtkObject 00062 { 00063 public: 00064 vtkTypeMacro(vtkLocator,vtkObject); 00065 void PrintSelf(ostream& os, vtkIndent indent); 00066 00068 00069 virtual void SetDataSet(vtkDataSet*); 00070 vtkGetObjectMacro(DataSet,vtkDataSet); 00072 00074 00077 vtkSetClampMacro(MaxLevel,int,0,VTK_INT_MAX); 00078 vtkGetMacro(MaxLevel,int); 00080 00082 00085 vtkGetMacro(Level,int); 00087 00089 00093 vtkSetMacro(Automatic,int); 00094 vtkGetMacro(Automatic,int); 00095 vtkBooleanMacro(Automatic,int); 00097 00099 00101 vtkSetClampMacro(Tolerance,double,0.0,VTK_DOUBLE_MAX); 00102 vtkGetMacro(Tolerance,double); 00104 00107 virtual void Update(); 00108 00110 virtual void Initialize(); 00111 00113 virtual void BuildLocator() = 0; 00114 00116 virtual void FreeSearchStructure() = 0; 00117 00122 virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0; 00123 00125 00126 vtkGetMacro(BuildTime, unsigned long); 00128 00130 00131 virtual void Register(vtkObjectBase *o); 00132 virtual void UnRegister(vtkObjectBase *o); 00133 protected: 00134 vtkLocator(); 00135 ~vtkLocator(); 00137 00138 vtkDataSet *DataSet; 00139 int Automatic; // boolean controls automatic subdivision (or uses user spec.) 00140 double Tolerance; // for performing merging 00141 int MaxLevel; 00142 int Level; 00143 00144 vtkTimeStamp BuildTime; // time at which locator was built 00145 00146 virtual void ReportReferences(vtkGarbageCollector*); 00147 private: 00148 vtkLocator(const vtkLocator&); // Not implemented. 00149 void operator=(const vtkLocator&); // Not implemented. 00150 }; 00151 00152 #endif 00153 00154