VTK
vtkUnstructuredGridBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnstructuredGridBase.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 =========================================================================*/
28 #ifndef vtkUnstructuredGridBase_h
29 #define vtkUnstructuredGridBase_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkPointSet.h"
33 
34 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridBase : public vtkPointSet
35 {
36 public:
37  vtkAbstractTypeMacro(vtkUnstructuredGridBase,vtkPointSet)
38  void PrintSelf(ostream &os, vtkIndent indent) override
39  {
40  this->Superclass::PrintSelf(os, indent);
41  }
42 
43  int GetDataObjectType() override { return VTK_UNSTRUCTURED_GRID_BASE; }
44 
48  virtual void Allocate(vtkIdType numCells=1000, int extSize=1000) = 0;
49 
53  void DeepCopy(vtkDataObject *src) override;
54 
64  virtual vtkIdType InsertNextCell(int type, vtkIdType npts,
65  vtkIdType *ptIds) = 0;
66 
75  virtual vtkIdType InsertNextCell(int type, vtkIdList *ptIds) = 0;
76 
77  // Description:
78  // Insert/create a polyhedron cell. npts is the number of unique points in
79  // the cell. pts is the list of the unique cell point Ids. nfaces is the
80  // number of faces in the cell. faces is the face-stream
81  // [numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...].
82  // All point Ids are global.
83  virtual vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds,
84  vtkIdType nfaces, vtkIdType *faces) = 0;
85 
92  virtual void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts) = 0;
93 
99  virtual void GetIdsOfCellsOfType(int type, vtkIdTypeArray *array) = 0;
100 
104  virtual int IsHomogeneous() = 0;
105 
107 
113 
114 protected:
116  ~vtkUnstructuredGridBase() override;
117 
118 private:
120  void operator=(const vtkUnstructuredGridBase&) = delete;
121 };
122 
123 #endif
Store vtkAlgorithm input/output information.
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
int GetDataObjectType() override
Return the type of data object.
list of point or cell ids
Definition: vtkIdList.h:30
#define VTK_UNSTRUCTURED_GRID_BASE
Definition: vtkType.h:127
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:58
dataset represents arbitrary combinations of all possible cell types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.