VTK
vtkGenericDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericDataSet.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 =========================================================================*/
56 #ifndef __vtkGenericDataSet_h
57 #define __vtkGenericDataSet_h
58 
59 #include "vtkDataObject.h"
60 
61 class vtkCellTypes;
62 class vtkGenericCellIterator;
63 class vtkGenericAttributeCollection;
64 class vtkGenericCellTessellator;
65 class vtkGenericPointIterator;
66 
68 {
69 public:
71 
73  void PrintSelf(ostream& os, vtkIndent indent);
75 
78  virtual vtkIdType GetNumberOfPoints() = 0;
79 
83  virtual vtkIdType GetNumberOfCells(int dim=-1) = 0;
84 
89  virtual int GetCellDimension() = 0;
90 
98  virtual void GetCellTypes(vtkCellTypes *types);
99 
108  virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
109 
111 
117  virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
118  int exteriorOnly=0) = 0;
120 
125  virtual vtkGenericPointIterator *NewPointIterator()=0;
126 
128 
137  virtual int FindCell(double x[3],
138  vtkGenericCellIterator* &cell,
139  double tol2,
140  int &subId,
141  double pcoords[3]) = 0;
143 
145 
147  virtual void FindPoint(double x[3],
148  vtkGenericPointIterator *p)=0;
150 
153  virtual unsigned long int GetMTime();
154 
156  virtual void ComputeBounds()=0;
157 
161  virtual double *GetBounds();
162 
165  virtual void GetBounds(double bounds[6]);
166 
169  virtual double *GetCenter();
170 
172  virtual void GetCenter(double center[3]);
173 
176  virtual double GetLength();
177 
179 
180  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
182 
184 
193  { return this->Superclass::GetAttributes(type); }
195 
197 
199  virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
200  vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
202 
206  virtual unsigned long GetActualMemorySize();
207 
209  int GetDataObjectType();
210 
212  virtual vtkIdType GetEstimatedSize() = 0;
213 
214  //BTX
216 
217  static vtkGenericDataSet* GetData(vtkInformation* info);
218  static vtkGenericDataSet* GetData(vtkInformationVector* v, int i=0);
219  //ETX
221 
222 protected:
226 
227  virtual ~vtkGenericDataSet();
228 
229  vtkGenericAttributeCollection *Attributes;
230 
231  //Main helper class to tesselate a higher order cell into linear ones.
232  vtkGenericCellTessellator *Tessellator;
233 
234  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
235  double Center[3]; // Center of the geometric bounding box
236  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
237 
238 private:
239  vtkGenericDataSet(const vtkGenericDataSet&); // Not implemented.
240  void operator=(const vtkGenericDataSet&); // Not implemented.
241 };
242 
243 #endif
vtkTimeStamp ComputeTime
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
record modification and/or execution time
Definition: vtkTimeStamp.h:33
int vtkIdType
Definition: vtkType.h:255
a simple class to control print indentation
Definition: vtkIndent.h:37
represent and manipulate attribute data in a dataset
virtual vtkDataSetAttributes * GetAttributes(int type)
Store zero or more vtkInformation instances.
defines dataset interface
helper class to get VTK data object types as string and instantiate them
vtkGenericCellTessellator * Tessellator
vtkGenericAttributeCollection * Attributes