VTK  9.7.1
vtkGenericDataSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
45 #ifndef vtkGenericDataSet_h
46 #define vtkGenericDataSet_h
47 
48 #include "vtkCommonDataModelModule.h" // For export macro
49 #include "vtkDataObject.h"
50 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0()
51 
52 VTK_ABI_NAMESPACE_BEGIN
53 class vtkCellTypes;
58 
59 class VTKCOMMONDATAMODEL_EXPORT vtkGenericDataSet : public vtkDataObject
60 {
61 public:
63 
67  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
75  virtual vtkIdType GetNumberOfPoints() = 0;
76 
83  virtual vtkIdType GetNumberOfCells(int dim = -1) = 0;
84 
88  vtkIdType GetNumberOfElements(int type) override;
89 
96  virtual int GetCellDimension() = 0;
97 
99 
109  virtual void GetDistinctCellTypes(vtkCellTypes* types);
110  VTK_DEPRECATED_IN_9_6_0("Use GetDistinctCellTypes(vtkCellTypes* types) instead.")
111  virtual void GetCellTypes(vtkCellTypes* types) { this->GetDistinctCellTypes(types); }
113 
126  virtual vtkGenericCellIterator* NewCellIterator(int dim = -1) = 0;
127 
138  virtual vtkGenericCellIterator* NewBoundaryIterator(int dim = -1, int exteriorOnly = 0) = 0;
139 
147  virtual vtkGenericPointIterator* NewPointIterator() = 0;
148 
162  virtual int FindCell(
163  double x[3], vtkGenericCellIterator*& cell, double tol2, int& subId, double pcoords[3]) = 0;
164 
170  virtual void FindPoint(double x[3], vtkGenericPointIterator* p) = 0;
171 
176  vtkMTimeType GetMTime() override;
177 
181  virtual void ComputeBounds() = 0;
182 
189  virtual double* GetBounds();
190 
195  virtual void GetBounds(double bounds[6]);
196 
202  virtual double* GetCenter();
203 
207  virtual void GetCenter(double center[3]);
208 
213  virtual double GetLength();
214 
216 
219  vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
221 
238  {
239  return this->Superclass::GetAttributes(type);
240  }
241 
243 
248  virtual void SetTessellator(vtkGenericCellTessellator* tessellator);
249  vtkGetObjectMacro(Tessellator, vtkGenericCellTessellator);
251 
257  unsigned long GetActualMemorySize() override;
258 
262  int GetDataObjectType() VTK_FUTURE_CONST override;
263 
267  virtual vtkIdType GetEstimatedSize() = 0;
268 
270 
274  static vtkGenericDataSet* GetData(vtkInformationVector* v, int i = 0);
276 
277 protected:
283 
284  ~vtkGenericDataSet() override;
285 
287 
288  // Main helper class to tessellate a higher order cell into linear ones.
290 
291  double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
292  double Center[3]; // Center of the geometric bounding box
293  vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
294 
295 private:
296  vtkGenericDataSet(const vtkGenericDataSet&) = delete;
297  void operator=(const vtkGenericDataSet&) = delete;
298 };
299 
300 VTK_ABI_NAMESPACE_END
301 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetBounds(T a, double bds[6])
helper class to perform cell tessellation
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
record modification and/or execution time
Definition: vtkTimeStamp.h:24
int vtkIdType
Definition: vtkType.h:363
iterator used to traverse points
iterator used to traverse cells
#define VTK_DEPRECATED_IN_9_6_0(reason)
virtual int GetDataObjectType() VTK_FUTURE_CONST
Return class name of data type.
a simple class to control print indentation
Definition: vtkIndent.h:28
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).
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
#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.
general representation of visualization data
Definition: vtkDataObject.h:55
object provides direct access to cells in vtkCellArray and type information
Definition: vtkCellTypes.h:43