VTK  9.0.1
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 
101  virtual int GetCellDimension() = 0;
102 
113  virtual void GetCellTypes(vtkCellTypes* types);
114 
127  virtual vtkGenericCellIterator* NewCellIterator(int dim = -1) = 0;
128 
139  virtual vtkGenericCellIterator* NewBoundaryIterator(int dim = -1, int exteriorOnly = 0) = 0;
140 
148  virtual vtkGenericPointIterator* NewPointIterator() = 0;
149 
163  virtual int FindCell(
164  double x[3], vtkGenericCellIterator*& cell, double tol2, int& subId, double pcoords[3]) = 0;
165 
171  virtual void FindPoint(double x[3], vtkGenericPointIterator* p) = 0;
172 
177  vtkMTimeType GetMTime() override;
178 
182  virtual void ComputeBounds() = 0;
183 
190  virtual double* GetBounds();
191 
196  virtual void GetBounds(double bounds[6]);
197 
203  virtual double* GetCenter();
204 
208  virtual void GetCenter(double center[3]);
209 
214  virtual double GetLength();
215 
217 
220  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
222 
239  {
240  return this->Superclass::GetAttributes(type);
241  }
242 
244 
249  virtual void SetTessellator(vtkGenericCellTessellator* tessellator);
250  vtkGetObjectMacro(Tessellator, vtkGenericCellTessellator);
252 
258  unsigned long GetActualMemorySize() override;
259 
263  int GetDataObjectType() override;
264 
268  virtual vtkIdType GetEstimatedSize() = 0;
269 
271 
275  static vtkGenericDataSet* GetData(vtkInformationVector* v, int i = 0);
277 
278 protected:
284 
285  ~vtkGenericDataSet() override;
286 
288 
289  // Main helper class to tessellate a higher order cell into linear ones.
291 
292  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
293  double Center[3]; // Center of the geometric bounding box
294  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
295 
296 private:
297  vtkGenericDataSet(const vtkGenericDataSet&) = delete;
298  void operator=(const vtkGenericDataSet&) = delete;
299 };
300 
301 #endif
vtkGenericPointIterator
iterator used to traverse points
Definition: vtkGenericPointIterator.h:39
vtkGenericDataSet::ComputeTime
vtkTimeStamp ComputeTime
Definition: vtkGenericDataSet.h:294
vtkCellTypes
object provides direct access to cells in vtkCellArray and type information
Definition: vtkCellTypes.h:47
vtkGenericDataSet::Tessellator
vtkGenericCellTessellator * Tessellator
Definition: vtkGenericDataSet.h:290
vtkGenericDataSet::Attributes
vtkGenericAttributeCollection * Attributes
Definition: vtkGenericDataSet.h:287
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkDataObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:53
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkX3D::center
@ center
Definition: vtkX3D.h:236
vtkGenericCellIterator
iterator used to traverse cells
Definition: vtkGenericCellIterator.h:41
vtkDataObject::GetDataObjectType
virtual int GetDataObjectType()
Return class name of data type.
Definition: vtkDataObject.h:125
vtkGenericDataSet
defines dataset interface
Definition: vtkGenericDataSet.h:69
vtkDataObject::GetMTime
vtkMTimeType GetMTime() override
Data objects are composite objects and need to check each part for MTime.
vtkGenericCellTessellator
helper class to perform cell tessellation
Definition: vtkGenericCellTessellator.h:58
vtkGenericDataSet::GetAttributes
vtkDataSetAttributes * GetAttributes(int type) override
Returns the attributes of the data object of the specified attribute type.
Definition: vtkGenericDataSet.h:238
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataObject::GetActualMemorySize
virtual unsigned long GetActualMemorySize()
Return the actual size of the data in kibibytes (1024 bytes).
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkDataObject.h
vtkGenericAttributeCollection
a collection of attributes
Definition: vtkGenericAttributeCollection.h:33
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:42
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkDataObject::GetData
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293