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 "vtkCommonDataModelModule.h" // For export macro
60 #include "vtkDataObject.h"
61 
62 class vtkCellTypes;
67 
69 {
70 public:
72 
74  void PrintSelf(ostream& os, vtkIndent indent);
76 
79  virtual vtkIdType GetNumberOfPoints() = 0;
80 
84  virtual vtkIdType GetNumberOfCells(int dim=-1) = 0;
85 
90  virtual int GetCellDimension() = 0;
91 
99  virtual void GetCellTypes(vtkCellTypes *types);
100 
109  virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
110 
112 
118  virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
119  int exteriorOnly=0) = 0;
121 
126  virtual vtkGenericPointIterator *NewPointIterator()=0;
127 
129 
138  virtual int FindCell(double x[3],
139  vtkGenericCellIterator* &cell,
140  double tol2,
141  int &subId,
142  double pcoords[3]) = 0;
144 
146 
148  virtual void FindPoint(double x[3],
151 
154  virtual unsigned long int GetMTime();
155 
157  virtual void ComputeBounds()=0;
158 
162  virtual double *GetBounds();
163 
166  virtual void GetBounds(double bounds[6]);
167 
170  virtual double *GetCenter();
171 
173  virtual void GetCenter(double center[3]);
174 
177  virtual double GetLength();
178 
180 
181  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
183 
185 
194  { return this->Superclass::GetAttributes(type); }
196 
198 
200  virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
201  vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
203 
207  virtual unsigned long GetActualMemorySize();
208 
210  int GetDataObjectType();
211 
213  virtual vtkIdType GetEstimatedSize() = 0;
214 
215  //BTX
217 
219  static vtkGenericDataSet* GetData(vtkInformationVector* v, int i=0);
220  //ETX
222 
223 protected:
227 
228  virtual ~vtkGenericDataSet();
229 
231 
232  //Main helper class to tesselate a higher order cell into linear ones.
234 
235  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
236  double Center[3]; // Center of the geometric bounding box
237  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
238 
239 private:
240  vtkGenericDataSet(const vtkGenericDataSet&); // Not implemented.
241  void operator=(const vtkGenericDataSet&); // Not implemented.
242 };
243 
244 #endif
static vtkDataObject * GetData(vtkInformation *info)
vtkTimeStamp ComputeTime
helper class to perform cell tessellation
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
unsigned long int GetMTime()
int vtkIdType
Definition: vtkType.h:275
iterator used to traverse points
iterator used to traverse cells
a simple class to control print indentation
Definition: vtkIndent.h:38
represent and manipulate attribute data in a dataset
void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetActualMemorySize()
virtual vtkDataSetAttributes * GetAttributes(int type)
Store zero or more vtkInformation instances.
defines dataset interface
virtual int GetDataObjectType()
general representation of visualization data
Definition: vtkDataObject.h:64
object provides direct access to cells in vtkCellArray and type information
Definition: vtkCellTypes.h:51
#define VTKCOMMONDATAMODEL_EXPORT
vtkGenericCellTessellator * Tessellator
vtkGenericAttributeCollection * Attributes