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 =========================================================================*/
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 
86 
93  virtual vtkIdType GetNumberOfCells(int dim=-1) = 0;
94 
101  virtual int GetCellDimension() = 0;
102 
113  virtual void GetCellTypes(vtkCellTypes *types);
114 
126  virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
127 
138  int exteriorOnly=0) = 0;
139 
147 
161  virtual int FindCell(double x[3],
162  vtkGenericCellIterator* &cell,
163  double tol2,
164  int &subId,
165  double pcoords[3]) = 0;
166 
172  virtual void FindPoint(double x[3],
174 
179  vtkMTimeType GetMTime() override;
180 
184  virtual void ComputeBounds()=0;
185 
192  virtual double *GetBounds();
193 
198  virtual void GetBounds(double bounds[6]);
199 
205  virtual double *GetCenter();
206 
210  virtual void GetCenter(double center[3]);
211 
216  virtual double GetLength();
217 
219 
222  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
224 
241  { return this->Superclass::GetAttributes(type); }
242 
244 
249  virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
250  vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
252 
258  unsigned long GetActualMemorySize() override;
259 
263  int GetDataObjectType() override;
264 
269 
271 
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:43
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:294
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:54
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:290
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:287
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:60
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
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
Methods invoked by print to print information about the object including superclasses.
vtkX3D::center
@ center
Definition: vtkX3D.h:230
vtkGenericCellIterator
iterator used to traverse cells
Definition: vtkGenericCellIterator.h:45
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:70
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:240
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:40
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:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
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)
vtkGenericAttributeCollection
a collection of attributes
Definition: vtkGenericAttributeCollection.h:37
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:65
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:302