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) override;
46 
49 
50  bool IsDoneWithTraversal() override;
51  vtkIdType GetCellId() override;
52 
53 protected:
56 
57  void ResetToFirstCell() override;
58  void IncrementToNextCell() override;
59  void FetchCellType() override;
60  void FetchPointIds() override;
61  void FetchPoints() override;
62 
63 private:
65  void operator=(const vtkMappedUnstructuredGridCellIterator &) = delete;
66 
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() override
Returns false while the iterator is valid.
Default cell iterator for vtkMappedUnstructuredGrid.
void FetchPoints() override
Lookup the cell points in the data set and store them in this->Points.
void IncrementToNextCell() override
Update internal state to point to the next cell.
int vtkIdType
Definition: vtkType.h:347
vtkMappedUnstructuredGridCellIterator< ImplementationType > ThisType
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ResetToFirstCell() override
Update internal state to point to the first cell.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetMappedUnstructuredGrid(vtkMappedUnstructuredGrid< ImplementationType, ThisType > *grid)
void FetchPointIds() override
Lookup the cell point ids in the data set and store them in this->PointIds.
vtkTemplateTypeMacro(vtkMappedUnstructuredGridCellIterator< Implementation >, vtkCellIterator) typedef Implementation ImplementationType
void FetchCellType() override
Lookup the cell type in the data set and store it in this->CellType.
Efficient cell iterator for vtkDataSet topologies.
vtkIdType GetCellId() override
Get the id of the current cell.
static vtkMappedUnstructuredGridCellIterator< ImplementationType > * New()
Allows datasets with arbitrary storage layouts to be used with VTK.