VTK  9.2.6
vtkUniformGridAMRDataIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUniformGridAMRDataIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkUniformGridAMRDataIterator_h
26 #define vtkUniformGridAMRDataIterator_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkSmartPointer.h" //for member variable Information
31 
32 class vtkInformation;
33 class vtkAMRInformation;
35 class vtkUniformGridAMR;
36 class AMRIndexIterator;
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRDataIterator : public vtkCompositeDataIterator
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
52 
53  int HasCurrentMetaData() override { return 1; }
54 
59 
65  unsigned int GetCurrentFlatIndex() override;
66 
70  virtual unsigned int GetCurrentLevel();
71 
76  virtual unsigned int GetCurrentIndex();
77 
81  void GoToFirstItem() override;
82 
86  void GoToNextItem() override;
87 
94  int IsDoneWithTraversal() override;
95 
96 protected:
100 
101 private:
103  void operator=(const vtkUniformGridAMRDataIterator&) = delete;
104 
107  vtkAMRInformation* AMRInfo;
108  vtkAMRDataInternals* AMRData;
109 
110  void GetCurrentIndexPair(unsigned int& level, unsigned int& id);
111 };
112 
113 #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:119
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.
int HasCurrentMetaData() override
Returns if the a meta-data information object is present for the current item.
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.
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:401