VTK
dox/Common/DataModel/vtkMappedUnstructuredGridCellIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMappedUnstructuredGridCellIterator.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 =========================================================================*/
00015 
00026 #ifndef __vtkMappedUnstructuredGridCellIterator_h
00027 #define __vtkMappedUnstructuredGridCellIterator_h
00028 
00029 #include "vtkCellIterator.h"
00030 #include "vtkSmartPointer.h" // For vtkSmartPointer
00031 #include "vtkTypeTemplate.h" // For vtkTypeTemplate
00032 
00033 template <class Implementation, class CellIterator>
00034 class vtkMappedUnstructuredGrid;
00035 
00036 template <class Implementation>
00037 class vtkMappedUnstructuredGridCellIterator :
00038     public vtkTypeTemplate<vtkMappedUnstructuredGridCellIterator<Implementation>,
00039       vtkCellIterator>
00040 {
00041 public:
00042   typedef Implementation ImplementationType;
00043   typedef vtkMappedUnstructuredGridCellIterator<ImplementationType> ThisType;
00044   static vtkMappedUnstructuredGridCellIterator<ImplementationType> *New();
00045   virtual void PrintSelf(ostream &os, vtkIndent indent);
00046 
00047   void SetMappedUnstructuredGrid(
00048       vtkMappedUnstructuredGrid<ImplementationType, ThisType> *grid);
00049 
00050   bool IsDoneWithTraversal();
00051   vtkIdType GetCellId();
00052 
00053 protected:
00054   vtkMappedUnstructuredGridCellIterator();
00055   ~vtkMappedUnstructuredGridCellIterator();
00056 
00057   void ResetToFirstCell();
00058   void IncrementToNextCell();
00059   void FetchCellType();
00060   void FetchPointIds();
00061   void FetchPoints();
00062 
00063 private:
00064   vtkMappedUnstructuredGridCellIterator(const vtkMappedUnstructuredGridCellIterator &); // Not implemented.
00065   void operator=(const vtkMappedUnstructuredGridCellIterator &);   // Not implemented.
00066 
00067   vtkSmartPointer<ImplementationType> Impl;
00068   vtkSmartPointer<vtkPoints> GridPoints;
00069   vtkIdType CellId;
00070   vtkIdType NumberOfCells;
00071 };
00072 
00073 #include "vtkMappedUnstructuredGridCellIterator.txx"
00074 
00075 #endif //__vtkMappedUnstructuredGridCellIterator_h
00076 
00077 // VTK-HeaderTest-Exclude: vtkMappedUnstructuredGridCellIterator.h