VTK  9.2.6
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 =========================================================================*/
57 #ifndef vtkGenericDataSet_h
58 #define vtkGenericDataSet_h
59 
60 #include "vtkCommonDataModelModule.h" // For export macro
61 #include "vtkDataObject.h"
62 
63 class vtkCellTypes;
68 
69 class VTKCOMMONDATAMODEL_EXPORT vtkGenericDataSet : public vtkDataObject
70 {
71 public:
73 
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
85  virtual vtkIdType GetNumberOfPoints() = 0;
86 
93  virtual vtkIdType GetNumberOfCells(int dim = -1) = 0;
94 
98  vtkIdType GetNumberOfElements(int type) override;
99 
106  virtual int GetCellDimension() = 0;
107 
118  virtual void GetCellTypes(vtkCellTypes* types);
119 
132  virtual vtkGenericCellIterator* NewCellIterator(int dim = -1) = 0;
133 
144  virtual vtkGenericCellIterator* NewBoundaryIterator(int dim = -1, int exteriorOnly = 0) = 0;
145 
153  virtual vtkGenericPointIterator* NewPointIterator() = 0;
154 
168  virtual int FindCell(
169  double x[3], vtkGenericCellIterator*& cell, double tol2, int& subId, double pcoords[3]) = 0;
170 
176  virtual void FindPoint(double x[3], vtkGenericPointIterator* p) = 0;
177 
182  vtkMTimeType GetMTime() override;
183 
187  virtual void ComputeBounds() = 0;
188 
195  virtual double* GetBounds();
196 
201  virtual void GetBounds(double bounds[6]);
202 
208  virtual double* GetCenter();
209 
213  virtual void GetCenter(double center[3]);
214 
219  virtual double GetLength();
220 
222 
225  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
227 
244  {
245  return this->Superclass::GetAttributes(type);
246  }
247 
249 
254  virtual void SetTessellator(vtkGenericCellTessellator* tessellator);
255  vtkGetObjectMacro(Tessellator, vtkGenericCellTessellator);
257 
263  unsigned long GetActualMemorySize() override;
264 
268  int GetDataObjectType() override;
269 
273  virtual vtkIdType GetEstimatedSize() = 0;
274 
276 
280  static vtkGenericDataSet* GetData(vtkInformationVector* v, int i = 0);
282 
283 protected:
289 
290  ~vtkGenericDataSet() override;
291 
293 
294  // Main helper class to tessellate a higher order cell into linear ones.
296 
297  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
298  double Center[3]; // Center of the geometric bounding box
299  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
300 
301 private:
302  vtkGenericDataSet(const vtkGenericDataSet&) = delete;
303  void operator=(const vtkGenericDataSet&) = delete;
304 };
305 
306 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void GetBounds(T a, double bds[6])
vtkTimeStamp ComputeTime
helper class to perform cell tessellation
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
record modification and/or execution time
Definition: vtkTimeStamp.h:35
int vtkIdType
Definition: vtkType.h:332
iterator used to traverse points
iterator used to traverse cells
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDataSetAttributes * GetAttributes(int type) override
Returns the attributes of the data object of the specified attribute type.
represent and manipulate attribute data in a dataset
virtual unsigned long GetActualMemorySize()
Return the actual size of the data in kibibytes (1024 bytes).
#define VTK_NEWINSTANCE
virtual vtkIdType GetNumberOfElements(int type)
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
Store zero or more vtkInformation instances.
defines dataset interface
vtkMTimeType GetMTime() override
Data objects are composite objects and need to check each part for MTime.
virtual int GetDataObjectType()
Return class name of data type.
general representation of visualization data
Definition: vtkDataObject.h:65
object provides direct access to cells in vtkCellArray and type information
Definition: vtkCellTypes.h:56
vtkGenericCellTessellator * Tessellator
vtkGenericAttributeCollection * Attributes