VTK
dox/Common/DataModel/vtkUniformGridAMRDataIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkUniformGridAMRDataIterator.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00024 #ifndef __vtkUniformGridAMRDataIterator_h
00025 #define __vtkUniformGridAMRDataIterator_h
00026 
00027 #include "vtkCommonDataModelModule.h" // For export macro
00028 #include "vtkCompositeDataIterator.h"
00029 #include "vtkSmartPointer.h" //for member variable Information
00030 
00031 class vtkInformation;
00032 class vtkAMRInformation;
00033 class vtkAMRDataInternals;
00034 class vtkUniformGridAMR;
00035 class AMRIndexIterator;
00036 
00037 class VTKCOMMONDATAMODEL_EXPORT vtkUniformGridAMRDataIterator :
00038   public vtkCompositeDataIterator
00039 {
00040 public:
00041   static vtkUniformGridAMRDataIterator* New();
00042   vtkTypeMacro(vtkUniformGridAMRDataIterator, vtkCompositeDataIterator);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00049   virtual vtkInformation* GetCurrentMetaData();
00050 
00051   virtual int HasCurrentMetaData() { return 1;}
00052 
00055   virtual vtkDataObject* GetCurrentDataObject();
00056 
00060   unsigned int GetCurrentFlatIndex();
00061 
00063   virtual unsigned int GetCurrentLevel();
00064 
00067   virtual unsigned int GetCurrentIndex();
00068 
00070   virtual void GoToFirstItem();
00071 
00073   virtual void GoToNextItem();
00074 
00078   virtual int IsDoneWithTraversal();
00079 
00080 
00081 //BTX
00082 protected:
00083   vtkUniformGridAMRDataIterator();
00084   ~vtkUniformGridAMRDataIterator();
00085   vtkSmartPointer<AMRIndexIterator> Iter;
00086 private:
00087   vtkUniformGridAMRDataIterator(const vtkUniformGridAMRDataIterator&); // Not implemented.
00088   void operator=(const vtkUniformGridAMRDataIterator&); // Not implemented.
00089 
00090   vtkSmartPointer<vtkInformation> Information;
00091   vtkSmartPointer<vtkUniformGridAMR> AMR;
00092   vtkAMRInformation* AMRInfo;
00093   vtkAMRDataInternals* AMRData;
00094 
00095   void GetCurrentIndexPair(unsigned int& level, unsigned int& id);
00096 //ETX
00097 };
00098 
00099 #endif