VTK  9.3.1
vtkDataSetCellIterator.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 vtkDataSetCellIterator_h
13 #define vtkDataSetCellIterator_h
14 
15 #include "vtkCellIterator.h"
16 #include "vtkCommonDataModelModule.h" // For export macro
17 #include "vtkSmartPointer.h" // For vtkSmartPointer
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkDataSet;
21 
22 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetCellIterator : public vtkCellIterator
23 {
24 public:
25  static vtkDataSetCellIterator* New();
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
29  bool IsDoneWithTraversal() override;
30  vtkIdType GetCellId() override;
31 
32 protected:
34  ~vtkDataSetCellIterator() override;
35 
36  void ResetToFirstCell() override;
37  void IncrementToNextCell() override;
38  void FetchCellType() override;
39  void FetchPointIds() override;
40  void FetchPoints() override;
41 
42  friend class vtkDataSet;
43  void SetDataSet(vtkDataSet* ds);
44 
47 
48 private:
50  void operator=(const vtkDataSetCellIterator&) = delete;
51 };
52 
53 VTK_ABI_NAMESPACE_END
54 #endif // vtkDataSetCellIterator_h
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int vtkIdType
Definition: vtkType.h:315
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.
virtual void IncrementToNextCell()=0
Update internal state to point to the next cell.
Implementation of vtkCellIterator using vtkDataSet API.
virtual vtkIdType GetCellId()=0
Get the id of the current cell.
vtkSmartPointer< vtkDataSet > DataSet
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.
virtual void FetchPoints()=0
Lookup the cell points in the data set and store them in this->Points.
Efficient cell iterator for vtkDataSet topologies.
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.