VTK  9.5.20250807
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
34 void GoToFirstItem() override;
35
40 void GoToNextItem() override;
41
46 [[nodiscard]] unsigned int GetCurrentLevel() const;
47
52 [[nodiscard]] unsigned int GetCurrentIndex() const;
53
62
63protected:
66
67private:
69 void operator=(const vtkUniformGridAMRIterator&) = delete;
70
75 [[nodiscard]] bool IsValid() VTK_FUTURE_CONST;
76
81 void CheckItemAndLoopIfNeeded();
82
83 unsigned int CurrentLevel = 0;
84 unsigned int CurrentIndex = 0;
85};
86
87VTK_ABI_NAMESPACE_END
88#endif
superclass for composite data iterators
Store vtkAlgorithm input/output information.
specialized vtkDataObjectTreeIterator for AMR
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.