VTK  9.0.1
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 =========================================================================*/
22 #ifndef vtkUniformGridAMRDataIterator_h
23 #define vtkUniformGridAMRDataIterator_h
24 
25 #include "vtkCommonDataModelModule.h" // For export macro
27 #include "vtkSmartPointer.h" //for member variable Information
28 
29 class vtkInformation;
30 class vtkAMRInformation;
32 class vtkUniformGridAMR;
33 class AMRIndexIterator;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRDataIterator : public vtkCompositeDataIterator
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
49 
50  int HasCurrentMetaData() override { return 1; }
51 
56 
62  unsigned int GetCurrentFlatIndex() override;
63 
67  virtual unsigned int GetCurrentLevel();
68 
73  virtual unsigned int GetCurrentIndex();
74 
78  void GoToFirstItem() override;
79 
83  void GoToNextItem() override;
84 
91  int IsDoneWithTraversal() override;
92 
93 protected:
97 
98 private:
100  void operator=(const vtkUniformGridAMRDataIterator&) = delete;
101 
104  vtkAMRInformation* AMRInfo;
105  vtkAMRDataInternals* AMRData;
106 
107  void GetCurrentIndexPair(unsigned int& level, unsigned int& id);
108 };
109 
110 #endif
vtkCompositeDataIterator::GoToFirstItem
virtual void GoToFirstItem()=0
Move the iterator to the beginning of the collection.
vtkAMRInformation
Meta data that describes the structure of an AMR data set.
Definition: vtkAMRInformation.h:47
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkCompositeDataIterator.h
vtkSmartPointer< AMRIndexIterator >
vtkCompositeDataIterator::GetCurrentDataObject
virtual vtkDataObject * GetCurrentDataObject()=0
Returns the current item.
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkUniformGridAMRDataIterator
subclass of vtkCompositeDataIterator with API to get current level and dataset index.
Definition: vtkUniformGridAMRDataIterator.h:35
vtkUniformGridAMRDataIterator::HasCurrentMetaData
int HasCurrentMetaData() override
Returns if the a meta-data information object is present for the current item.
Definition: vtkUniformGridAMRDataIterator.h:50
vtkCompositeDataIterator::IsDoneWithTraversal
virtual int IsDoneWithTraversal()=0
Test whether the iterator is finished with the traversal.
vtkUniformGridAMRDataIterator::Iter
vtkSmartPointer< AMRIndexIterator > Iter
Definition: vtkUniformGridAMRDataIterator.h:96
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkCompositeDataIterator::GetCurrentMetaData
virtual vtkInformation * GetCurrentMetaData()=0
Returns the meta-data associated with the current item.
vtkCompositeDataIterator::GetCurrentFlatIndex
virtual unsigned int GetCurrentFlatIndex()=0
Flat index is an index to identify the data in a composite data structure.
vtkCompositeDataIterator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUniformGridAMR
Definition: vtkUniformGridAMR.h:32
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkAMRDataInternals
container of vtkUniformGrid for an AMR data set
Definition: vtkAMRDataInternals.h:35
vtkCompositeDataIterator::GoToNextItem
virtual void GoToNextItem()=0
Move the iterator to the next item in the collection.