VTK
vtkMappedUnstructuredGridCellIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMappedUnstructuredGridCellIterator.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 =========================================================================*/
15 
27 #ifndef vtkMappedUnstructuredGridCellIterator_h
28 #define vtkMappedUnstructuredGridCellIterator_h
29 
30 #include "vtkCellIterator.h"
31 #include "vtkSmartPointer.h" // For vtkSmartPointer
32 
33 template <class Implementation, class CellIterator>
35 
36 template <class Implementation>
38 {
39 public:
42  typedef Implementation ImplementationType;
45  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46 
49 
50  bool IsDoneWithTraversal();
52 
53 protected:
56 
57  void ResetToFirstCell();
58  void IncrementToNextCell();
59  void FetchCellType();
60  void FetchPointIds();
61  void FetchPoints();
62 
63 private:
65  void operator=(const vtkMappedUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
66 
67  vtkSmartPointer<ImplementationType> Impl;
68  vtkSmartPointer<vtkPoints> GridPoints;
69  vtkIdType CellId;
70  vtkIdType NumberOfCells;
71 };
72 
73 #include "vtkMappedUnstructuredGridCellIterator.txx"
74 
75 #endif //vtkMappedUnstructuredGridCellIterator_h
76 
77 // VTK-HeaderTest-Exclude: vtkMappedUnstructuredGridCellIterator.h
bool IsDoneWithTraversal()
Returns false while the iterator is valid.
Default cell iterator for vtkMappedUnstructuredGrid.
void FetchPoints()
Lookup the cell points in the data set and store them in this->Points.
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition: vtkType.h:287
vtkMappedUnstructuredGridCellIterator< ImplementationType > ThisType
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetMappedUnstructuredGrid(vtkMappedUnstructuredGrid< ImplementationType, ThisType > *grid)
void FetchCellType()
Lookup the cell type in the data set and store it in this->CellType.
void ResetToFirstCell()
Update internal state to point to the first cell.
vtkTemplateTypeMacro(vtkMappedUnstructuredGridCellIterator< Implementation >, vtkCellIterator) typedef Implementation ImplementationType
void IncrementToNextCell()
Update internal state to point to the next cell.
Efficient cell iterator for vtkDataSet topologies.
vtkIdType GetCellId()
Get the id of the current cell.
static vtkMappedUnstructuredGridCellIterator< ImplementationType > * New()
represent and manipulate 3D points
Definition: vtkPoints.h:39
Allows datasets with arbitrary storage layouts to be used with VTK.
void FetchPointIds()
Lookup the cell point ids in the data set and store them in this->PointIds.