VTK  9.3.0
vtkUnstructuredGridCellIterator.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
12 #ifndef vtkUnstructuredGridCellIterator_h
13 #define vtkUnstructuredGridCellIterator_h
14 
15 #include "vtkCellArrayIterator.h" // Accessing cell array
16 #include "vtkCellIterator.h"
17 #include "vtkCommonDataModelModule.h" // For export macro
18 #include "vtkSmartPointer.h" // For vtkSmartPointer
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkCellArray;
22 class vtkIdTypeArray;
25 class vtkPoints;
26 
27 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator : public vtkCellIterator
28 {
29 public:
31 
36  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
43  bool IsDoneWithTraversal() override;
44  vtkIdType GetCellId() override;
46 
53  void GoToCell(vtkIdType cellId) { this->Cells->GoToCell(cellId); }
54 
55 protected:
58 
59  void ResetToFirstCell() override;
60  void IncrementToNextCell() override;
61  void FetchCellType() override;
62  void FetchPointIds() override;
63  void FetchPoints() override;
64  void FetchFaces() override;
65 
66  friend class vtkUnstructuredGrid;
68 
74 
75 private:
77  void operator=(const vtkUnstructuredGridCellIterator&) = delete;
78 };
79 
80 VTK_ABI_NAMESPACE_END
81 #endif // vtkUnstructuredGridCellIterator_h
object to represent cell connectivity
Definition: vtkCellArray.h:176
Efficient cell iterator for vtkDataSet topologies.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:29
represent and manipulate 3D points
Definition: vtkPoints.h:29
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:315