VTK  9.1.0
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 =========================================================================*/
76 #ifndef vtkGenericDataSet_h
77 #define vtkGenericDataSet_h
78 
79 #include "vtkCommonDataModelModule.h" // For export macro
80 #include "vtkDataObject.h"
81 
82 class vtkCellTypes;
87 
88 class VTKCOMMONDATAMODEL_EXPORT vtkGenericDataSet : public vtkDataObject
89 {
90 public:
92 
96  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
105 
112  virtual vtkIdType GetNumberOfCells(int dim = -1) = 0;
113 
118 
125  virtual int GetCellDimension() = 0;
126 
137  virtual void GetCellTypes(vtkCellTypes* types);
138 
151  virtual vtkGenericCellIterator* NewCellIterator(int dim = -1) = 0;
152 
163  virtual vtkGenericCellIterator* NewBoundaryIterator(int dim = -1, int exteriorOnly = 0) = 0;
164 
173 
187  virtual int FindCell(
188  double x[3], vtkGenericCellIterator*& cell, double tol2, int& subId, double pcoords[3]) = 0;
189 
195  virtual void FindPoint(double x[3], vtkGenericPointIterator* p) = 0;
196 
201  vtkMTimeType GetMTime() override;
202 
206  virtual void ComputeBounds() = 0;
207 
214  virtual double* GetBounds();
215 
220  virtual void GetBounds(double bounds[6]);
221 
227  virtual double* GetCenter();
228 
232  virtual void GetCenter(double center[3]);
233 
238  virtual double GetLength();
239 
241 
244  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
246 
263  {
264  return this->Superclass::GetAttributes(type);
265  }
266 
268 
273  virtual void SetTessellator(vtkGenericCellTessellator* tessellator);
274  vtkGetObjectMacro(Tessellator, vtkGenericCellTessellator);
276 
282  unsigned long GetActualMemorySize() override;
283 
287  int GetDataObjectType() override;
288 
293 
295 
301 
302 protected:
308 
309  ~vtkGenericDataSet() override;
310 
312 
313  // Main helper class to tessellate a higher order cell into linear ones.
315 
316  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
317  double Center[3]; // Center of the geometric bounding box
318  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
319 
320 private:
321  vtkGenericDataSet(const vtkGenericDataSet&) = delete;
322  void operator=(const vtkGenericDataSet&) = delete;
323 };
324 
325 #endif
vtkGenericPointIterator
iterator used to traverse points
Definition: vtkGenericPointIterator.h:40
vtkGenericDataSet::GetLength
virtual double GetLength()
Return the length of the diagonal of the bounding box.
vtkGenericDataSet::GetNumberOfPoints
virtual vtkIdType GetNumberOfPoints()=0
Return the number of points composing the dataset.
vtkGenericDataSet::ComputeTime
vtkTimeStamp ComputeTime
Definition: vtkGenericDataSet.h:318
vtkGenericDataSet::FindPoint
virtual void FindPoint(double x[3], vtkGenericPointIterator *p)=0
Locate the closest point ‘p’ to position ‘x’ (global coordinates).
vtkGenericDataSet::GetBounds
virtual void GetBounds(double bounds[6])
Return the geometry bounding box in global coordinates in the form (xmin,xmax, ymin,...
vtkCellTypes
object provides direct access to cells in vtkCellArray and type information
Definition: vtkCellTypes.h:137
vtkGenericDataSet::vtkGenericDataSet
vtkGenericDataSet()
Constructor with uninitialized bounds (1,-1, 1,-1, 1,-1), empty attribute collection and default tess...
vtkGenericDataSet::Tessellator
vtkGenericCellTessellator * Tessellator
Definition: vtkGenericDataSet.h:314
vtkGenericDataSet::GetCenter
virtual void GetCenter(double center[3])
Get the center of the bounding box in global coordinates.
vtkGenericDataSet::Attributes
vtkGenericAttributeCollection * Attributes
Definition: vtkGenericDataSet.h:311
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:170
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkGenericDataSet::GetDataObjectType
int GetDataObjectType() override
Return the type of data object.
vtkGenericDataSet::NewBoundaryIterator
virtual vtkGenericCellIterator * NewBoundaryIterator(int dim=-1, int exteriorOnly=0)=0
Return an iterator to traverse cell boundaries of dimension ‘dim’ (or all dimensions if -1) of the da...
vtkGenericDataSet::GetMTime
vtkMTimeType GetMTime() override
Datasets are composite objects and need to check each part for their modified time.
vtkGenericDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK type and print macros.
vtkX3D::center
@ center
Definition: vtkX3D.h:236
vtkGenericCellIterator
iterator used to traverse cells
Definition: vtkGenericCellIterator.h:42
vtkGenericDataSet::~vtkGenericDataSet
~vtkGenericDataSet() override
vtkGenericDataSet::GetCenter
virtual double * GetCenter()
Get the center of the bounding box in global coordinates.
vtkGenericDataSet::GetActualMemorySize
unsigned long GetActualMemorySize() override
Actual size of the data in kibibytes (1024 bytes); only valid after the pipeline has updated.
vtkGenericDataSet
defines dataset interface
Definition: vtkGenericDataSet.h:89
vtkGenericDataSet::FindCell
virtual int FindCell(double x[3], vtkGenericCellIterator *&cell, double tol2, int &subId, double pcoords[3])=0
Locate the closest cell to position ‘x’ (global coordinates) with respect to a tolerance squared ‘tol...
vtkGenericCellTessellator
helper class to perform cell tessellation
Definition: vtkGenericCellTessellator.h:59
vtkGenericDataSet::NewPointIterator
virtual vtkGenericPointIterator * NewPointIterator()=0
Return an iterator to traverse the points composing the dataset; they can be points that define a cel...
vtkGenericDataSet::GetData
static vtkGenericDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkGenericDataSet::GetAttributes
vtkDataSetAttributes * GetAttributes(int type) override
Returns the attributes of the data object of the specified attribute type.
Definition: vtkGenericDataSet.h:262
vtkGenericDataSet::GetEstimatedSize
virtual vtkIdType GetEstimatedSize()=0
Estimated size needed after tessellation (or special operation)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkGenericDataSet::GetNumberOfElements
vtkIdType GetNumberOfElements(int type) override
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
vtkGenericDataSet::GetCellDimension
virtual int GetCellDimension()=0
Return -1 if the dataset is explicitly defined by cells of varying dimensions or if there are no cell...
vtkGenericDataSet::ComputeBounds
virtual void ComputeBounds()=0
Compute the geometry bounding box.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkGenericDataSet::GetCellTypes
virtual void GetCellTypes(vtkCellTypes *types)
Get a list of types of cells in a dataset.
vtkGenericDataSet::SetTessellator
virtual void SetTessellator(vtkGenericCellTessellator *tessellator)
Set/Get a cell tessellator if cells must be tessellated during processing.
vtkDataObject.h
vtkGenericDataSet::GetData
static vtkGenericDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkGenericAttributeCollection
a collection of attributes
Definition: vtkGenericAttributeCollection.h:34
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:44
vtkGenericDataSet::GetNumberOfCells
virtual vtkIdType GetNumberOfCells(int dim=-1)=0
Return the number of cells that explicitly define the dataset.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkGenericDataSet::NewCellIterator
virtual vtkGenericCellIterator * NewCellIterator(int dim=-1)=0
Return an iterator to traverse cells of dimension ‘dim’ (or all dimensions if -1) that explicitly def...
vtkGenericDataSet::GetBounds
virtual double * GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,...
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287