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=========================================================================*/
31#ifndef vtkUnstructuredGridBase_h
32#define vtkUnstructuredGridBase_h
33
34#include "vtkCommonDataModelModule.h" // For export macro
35#include "vtkPointSet.h"
36
37class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridBase : public vtkPointSet
38{
39public:
41 void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
42 {
43 this->Superclass::PrintSelf(os, indent);
44 }
45
46 int GetDataObjectType() VTK_OVERRIDE { return VTK_UNSTRUCTURED_GRID_BASE; }
47
51 virtual void Allocate(vtkIdType numCells=1000, int extSize=1000) = 0;
52
56 void DeepCopy(vtkDataObject *src) VTK_OVERRIDE;
57
68 vtkIdType *ptIds) = 0;
69
78 virtual vtkIdType InsertNextCell(int type, vtkIdList *ptIds) = 0;
79
80 // Desciption:
81 // Insert/create a polyhedron cell. npts is the number of unique points in
82 // the cell. pts is the list of the unique cell point Ids. nfaces is the
83 // number of faces in the cell. faces is the face-stream
84 // [numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...].
85 // All point Ids are global.
86 virtual vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds,
87 vtkIdType nfaces, vtkIdType *faces) = 0;
88
95 virtual void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts) = 0;
96
102 virtual void GetIdsOfCellsOfType(int type, vtkIdTypeArray *array) = 0;
103
107 virtual int IsHomogeneous() = 0;
108
110
116
117protected:
120
121private:
122 vtkUnstructuredGridBase(const vtkUnstructuredGridBase&) VTK_DELETE_FUNCTION;
123 void operator=(const vtkUnstructuredGridBase&) VTK_DELETE_FUNCTION;
124};
125
126#endif
general representation of visualization data
Definition: vtkDataObject.h:65
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
list of point or cell ids
Definition: vtkIdList.h:37
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
dataset represents arbitrary combinations of all possible cell types.
vtkAbstractTypeMacro(vtkUnstructuredGridBase, vtkPointSet) void PrintSelf(ostream &os
static vtkUnstructuredGridBase * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds)=0
Insert/create cell in object by type and list of point ids defining cell topology.
virtual void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts)=0
Replace the points defining cell "cellId" with a new set of points.
int GetDataObjectType() override
Return the type of data object.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
virtual vtkIdType InsertNextCell(int type, vtkIdList *ptIds)=0
Insert/create cell in object by a list of point ids defining cell topology.
~vtkUnstructuredGridBase() override
virtual int IsHomogeneous()=0
Traverse cells and determine if cells are all of the same type.
virtual vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds, vtkIdType nfaces, vtkIdType *faces)=0
virtual void Allocate(vtkIdType numCells=1000, int extSize=1000)=0
Allocate memory for the number of cells indicated.
static vtkUnstructuredGridBase * GetData(vtkInformationVector *v, int i=0)
virtual void GetIdsOfCellsOfType(int type, vtkIdTypeArray *array)=0
Fill vtkIdTypeArray container with list of cell Ids.
@ info
Definition: vtkX3D.h:376
@ type
Definition: vtkX3D.h:516
int vtkIdType
Definition: vtkType.h:287
#define VTK_UNSTRUCTURED_GRID_BASE
Definition: vtkType.h:123