VTK: Common/DataModel/vtkUnstructuredGridCellIterator.h Source File

| 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;
23 class vtkUnsignedCharArray;
24 class vtkUnstructuredGrid;
25 class vtkPoints;
26
27 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator : public vtkCellIterator
28 {
29 public:
31
34 static vtkUnstructuredGridCellIterator* New();
35 vtkTypeMacro(vtkUnstructuredGridCellIterator, vtkCellIterator);
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:
56 vtkUnstructuredGridCellIterator();
57 ~vtkUnstructuredGridCellIterator() override;
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
69 vtkSmartPointer<vtkCellArrayIterator> Cells;
70 vtkSmartPointer<vtkUnsignedCharArray> Types;
71 vtkSmartPointer<vtkIdTypeArray> FaceConn;
72 vtkSmartPointer<vtkIdTypeArray> FaceLocs;
73 vtkSmartPointer<vtkPoints> Coords;
74
75 private:
76 vtkUnstructuredGridCellIterator(const vtkUnstructuredGridCellIterator&) = delete;
77 void operator=(const vtkUnstructuredGridCellIterator&) = delete;
78 };
79
80 VTK_ABI_NAMESPACE_END
81 #endif // vtkUnstructuredGridCellIterator_h
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkCellIterator
Efficient cell iterator for vtkDataSet topologies.
Definition: vtkCellIterator.h:79
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkSmartPointer< vtkCellArrayIterator >
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:40
vtkUnstructuredGridCellIterator
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
Definition: vtkUnstructuredGridCellIterator.h:28
vtkUnstructuredGridCellIterator::GoToCell
void GoToCell(vtkIdType cellId)
A method used to provide random access into cells.
Definition: vtkUnstructuredGridCellIterator.h:53
vtkUnstructuredGridCellIterator::vtkUnstructuredGridCellIterator
vtkUnstructuredGridCellIterator()
vtkUnstructuredGridCellIterator::Coords
vtkSmartPointer< vtkPoints > Coords
Definition: vtkUnstructuredGridCellIterator.h:73
vtkUnstructuredGridCellIterator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
vtkUnstructuredGridCellIterator::SetUnstructuredGrid
void SetUnstructuredGrid(vtkUnstructuredGrid *ug)
vtkUnstructuredGridCellIterator::IncrementToNextCell
void IncrementToNextCell() override
Update internal state to point to the next cell.
vtkUnstructuredGridCellIterator::ResetToFirstCell
void ResetToFirstCell() override
Update internal state to point to the first cell.
vtkUnstructuredGridCellIterator::FaceLocs
vtkSmartPointer< vtkIdTypeArray > FaceLocs
Definition: vtkUnstructuredGridCellIterator.h:72
vtkUnstructuredGridCellIterator::IsDoneWithTraversal
bool IsDoneWithTraversal() override
Override superclass methods.
vtkUnstructuredGridCellIterator::GetCellId
vtkIdType GetCellId() override
Override superclass methods.
vtkUnstructuredGridCellIterator::New
static vtkUnstructuredGridCellIterator * New()
Standard methods for instantiation, type information, and printing.
vtkUnstructuredGridCellIterator::FetchFaces
void FetchFaces() override
Lookup the cell faces in the data set and store them in this->Faces.
vtkUnstructuredGridCellIterator::FetchPoints
void FetchPoints() override
Lookup the cell points in the data set and store them in this->Points.
vtkUnstructuredGridCellIterator::Cells
vtkSmartPointer< vtkCellArrayIterator > Cells
Definition: vtkUnstructuredGridCellIterator.h:69
vtkUnstructuredGridCellIterator::Types
vtkSmartPointer< vtkUnsignedCharArray > Types
Definition: vtkUnstructuredGridCellIterator.h:70
vtkUnstructuredGridCellIterator::~vtkUnstructuredGridCellIterator
~vtkUnstructuredGridCellIterator() override
vtkUnstructuredGridCellIterator::FetchPointIds
void FetchPointIds() override
Lookup the cell point ids in the data set and store them in this->PointIds.
vtkUnstructuredGridCellIterator::FaceConn
vtkSmartPointer< vtkIdTypeArray > FaceConn
Definition: vtkUnstructuredGridCellIterator.h:71
vtkUnstructuredGridCellIterator::FetchCellType
void FetchCellType() override
Lookup the cell type in the data set and store it in this->CellType.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkCellArrayIterator.h
vtkCellIterator.h
vtkSmartPointer.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315