VTK  9.3.20240418
vtkUniformGridAMRDataIterator.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
13 #ifndef vtkUniformGridAMRDataIterator_h
14 #define vtkUniformGridAMRDataIterator_h
15 
16 #include "vtkCommonDataModelModule.h" // For export macro
18 #include "vtkSmartPointer.h" //for member variable Information
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkInformation;
22 class vtkAMRInformation;
24 class vtkUniformGridAMR;
25 class AMRIndexIterator;
26 
27 class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRDataIterator : public vtkCompositeDataIterator
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
41 
42  vtkTypeBool HasCurrentMetaData() override { return 1; }
43 
48 
54  unsigned int GetCurrentFlatIndex() override;
55 
59  virtual unsigned int GetCurrentLevel();
60 
65  virtual unsigned int GetCurrentIndex();
66 
70  void GoToFirstItem() override;
71 
75  void GoToNextItem() override;
76 
83  int IsDoneWithTraversal() override;
84 
85 protected:
89 
90 private:
92  void operator=(const vtkUniformGridAMRDataIterator&) = delete;
93 
96  vtkAMRInformation* AMRInfo;
97  vtkAMRDataInternals* AMRData;
98 
99  void GetCurrentIndexPair(unsigned int& level, unsigned int& id);
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
container of vtkUniformGrid for an AMR data set
Meta data that describes the structure of an AMR data set.
superclass for composite data iterators
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:108
Store vtkAlgorithm input/output information.
subclass of vtkCompositeDataIterator with API to get current level and dataset index.
virtual unsigned int GetCurrentLevel()
Returns the level for the current dataset.
unsigned int GetCurrentFlatIndex() override
Flat index is an index obtained by traversing the tree in preorder.
int IsDoneWithTraversal() override
Test whether the iterator is finished with the traversal.
virtual unsigned int GetCurrentIndex()
Returns the dataset index for the current data object.
static vtkUniformGridAMRDataIterator * New()
void GoToNextItem() override
Move the iterator to the next item in the collection.
vtkTypeBool HasCurrentMetaData() override
Returns if the a meta-data information object is present for the current item.
vtkDataObject * GetCurrentDataObject() override
Returns the current item.
void GoToFirstItem() override
Move the iterator to the beginning of the collection.
vtkSmartPointer< AMRIndexIterator > Iter
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation * GetCurrentMetaData() override
Returns the meta-data associated with the current item.
~vtkUniformGridAMRDataIterator() override
a concrete implementation of vtkCompositeDataSet
@ level
Definition: vtkX3D.h:395
int vtkTypeBool
Definition: vtkABI.h:64