VTK  9.5.20251013
vtkUniformGridAMRIterator.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
17#ifndef vtkUniformGridAMRIterator_h
18#define vtkUniformGridAMRIterator_h
19
20#include "vtkCommonDataModelModule.h" // For export macro
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRIterator : public vtkDataObjectTreeIterator
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
35 void GoToFirstItem() override;
36
41 void GoToNextItem() override;
42
47 [[nodiscard]] unsigned int GetCurrentLevel() const;
48
53 [[nodiscard]] unsigned int GetCurrentIndex() const;
54
63
64protected:
67
68private:
70 void operator=(const vtkUniformGridAMRIterator&) = delete;
71
76 [[nodiscard]] bool IsValid() VTK_FUTURE_CONST;
77
82 void CheckItemAndLoopIfNeeded();
83
84 unsigned int CurrentLevel = 0;
85 unsigned int CurrentIndex = 0;
86};
87
88VTK_ABI_NAMESPACE_END
89#endif
superclass for composite data iterators
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
specialized vtkDataObjectTreeIterator for AMR
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned int GetCurrentLevel() const
Returns the level for the current dataset.
vtkInformation * GetCurrentMetaData() override
Return the information about the current data object If the AMR being iterated on is a vtkOverlapping...
unsigned int GetCurrentIndex() const
Returns the dataset relative index for the current data object.
static vtkUniformGridAMRIterator * New()
void GoToFirstItem() override
Move the iterator to the beginning of the AMR, the index 0 at level 0.
~vtkUniformGridAMRIterator() override
void GoToNextItem() override
Move the iterator to the next item in the AMR, skip composite datasets, only stop on leaves.