VTK  9.3.1
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;
67  void SetUnstructuredGrid(vtkUnstructuredGrid* ug);
68 
74 
75 private:
77  void operator=(const vtkUnstructuredGridCellIterator&) = delete;
78 };
79 
80 VTK_ABI_NAMESPACE_END
81 #endif // vtkUnstructuredGridCellIterator_h
vtkSmartPointer< vtkIdTypeArray > FaceConn
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkSmartPointer< vtkUnsignedCharArray > Types
virtual void FetchCellType()=0
Lookup the cell type in the data set and store it in this->CellType.
virtual void ResetToFirstCell()=0
Update internal state to point to the first cell.
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
virtual void IncrementToNextCell()=0
Update internal state to point to the next cell.
virtual vtkIdType GetCellId()=0
Get the id of the current cell.
virtual void FetchPointIds()=0
Lookup the cell point ids in the data set and store them in this->PointIds.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dataset represents arbitrary combinations of all possible cell types
virtual void FetchFaces()
Lookup the cell faces in the data set and store them in this->Faces.
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:175
virtual void FetchPoints()=0
Lookup the cell points in the data set and store them in this->Points.
Efficient cell iterator for vtkDataSet topologies.
vtkSmartPointer< vtkIdTypeArray > FaceLocs
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual bool IsDoneWithTraversal()=0
Returns false while the iterator is valid.
void GoToCell(vtkIdType cellId)
A method used to provide random access into cells.
represent and manipulate 3D points
Definition: vtkPoints.h:28
vtkSmartPointer< vtkCellArrayIterator > Cells