VTK  9.2.6
vtkUnstructuredGridCellIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnstructuredGridCellIterator.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 =========================================================================*/
24 #ifndef vtkUnstructuredGridCellIterator_h
25 #define vtkUnstructuredGridCellIterator_h
26 
27 #include "vtkCellArrayIterator.h" // Accessing cell array
28 #include "vtkCellIterator.h"
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkSmartPointer.h" // For vtkSmartPointer
31 
32 class vtkCellArray;
33 class vtkIdTypeArray;
36 class vtkPoints;
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator : public vtkCellIterator
39 {
40 public:
42 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  bool IsDoneWithTraversal() override;
55  vtkIdType GetCellId() override;
57 
64  void GoToCell(vtkIdType cellId) { this->Cells->GoToCell(cellId); }
65 
66 protected:
69 
70  void ResetToFirstCell() override;
71  void IncrementToNextCell() override;
72  void FetchCellType() override;
73  void FetchPointIds() override;
74  void FetchPoints() override;
75  void FetchFaces() override;
76 
77  friend class vtkUnstructuredGrid;
79 
85 
86 private:
88  void operator=(const vtkUnstructuredGridCellIterator&) = delete;
89 };
90 
91 #endif // vtkUnstructuredGridCellIterator_h
object to represent cell connectivity
Definition: vtkCellArray.h:296
Efficient cell iterator for vtkDataSet topologies.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:119
represent and manipulate 3D points
Definition: vtkPoints.h:149
dynamic, self-adjusting array of unsigned char
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
void GoToCell(vtkIdType cellId)
A method used to provide random access into cells.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void SetUnstructuredGrid(vtkUnstructuredGrid *ug)
void IncrementToNextCell() override
Update internal state to point to the next cell.
void ResetToFirstCell() override
Update internal state to point to the first cell.
vtkSmartPointer< vtkIdTypeArray > FaceLocs
bool IsDoneWithTraversal() override
Override superclass methods.
vtkIdType GetCellId() override
Override superclass methods.
static vtkUnstructuredGridCellIterator * New()
Standard methods for instantiation, type information, and printing.
void FetchFaces() override
Lookup the cell faces in the data set and store them in this->Faces.
void FetchPoints() override
Lookup the cell points in the data set and store them in this->Points.
vtkSmartPointer< vtkCellArrayIterator > Cells
vtkSmartPointer< vtkUnsignedCharArray > Types
void FetchPointIds() override
Lookup the cell point ids in the data set and store them in this->PointIds.
vtkSmartPointer< vtkIdTypeArray > FaceConn
void FetchCellType() override
Lookup the cell type in the data set and store it in this->CellType.
dataset represents arbitrary combinations of all possible cell types
int vtkIdType
Definition: vtkType.h:332