VTK  9.3.20240328
vtkMappedUnstructuredGridCellIterator.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
3 
15 #ifndef vtkMappedUnstructuredGridCellIterator_h
16 #define vtkMappedUnstructuredGridCellIterator_h
17 
18 #include "vtkCellIterator.h"
19 #include "vtkSmartPointer.h" // For vtkSmartPointer
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 template <class Implementation, class CellIterator>
24 
25 template <class Implementation>
27 {
28 public:
30  typedef Implementation ImplementationType;
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
37  bool IsDoneWithTraversal() override;
38  vtkIdType GetCellId() override;
39 
40 protected:
43 
44  void ResetToFirstCell() override;
45  void IncrementToNextCell() override;
46  void FetchCellType() override;
47  void FetchPointIds() override;
48  void FetchPoints() override;
49 
50 private:
52  void operator=(const vtkMappedUnstructuredGridCellIterator&) = delete;
53 
55  vtkSmartPointer<vtkPoints> GridPoints;
56  vtkIdType CellId;
57  vtkIdType NumberOfCells;
58 };
59 
60 VTK_ABI_NAMESPACE_END
61 #include "vtkMappedUnstructuredGridCellIterator.txx" // template implementations
62 
63 #endif // vtkMappedUnstructuredGridCellIterator_h
64 
65 // VTK-HeaderTest-Exclude: vtkMappedUnstructuredGridCellIterator.h
Efficient cell iterator for vtkDataSet topologies.
a simple class to control print indentation
Definition: vtkIndent.h:108
Default cell iterator for vtkMappedUnstructuredGrid.
void FetchPoints() override
Lookup the cell points in the data set and store them in this->Points.
bool IsDoneWithTraversal() override
Returns false while the iterator is valid.
void FetchPointIds() override
Lookup the cell point ids in the data set and store them in this->PointIds.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetCellId() override
Get the id of the current cell.
void SetMappedUnstructuredGrid(vtkMappedUnstructuredGrid< ImplementationType, ThisType > *grid)
vtkMappedUnstructuredGridCellIterator< ImplementationType > ThisType
vtkTemplateTypeMacro(vtkMappedUnstructuredGridCellIterator< Implementation >, vtkCellIterator)
void ResetToFirstCell() override
Update internal state to point to the first cell.
void IncrementToNextCell() override
Update internal state to point to the next cell.
static vtkMappedUnstructuredGridCellIterator< ImplementationType > * New()
void FetchCellType() override
Lookup the cell type in the data set and store it in this->CellType.
Allows datasets with arbitrary storage layouts to be used with VTK.
int vtkIdType
Definition: vtkType.h:315