VTK
vtkUnstructuredGridCellIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnstructuredGridCellIterator.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 =========================================================================*/
24 #ifndef vtkUnstructuredGridCellIterator_h
25 #define vtkUnstructuredGridCellIterator_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkCellIterator.h"
29 #include "vtkSmartPointer.h" // For vtkSmartPointer
30 
31 class vtkCellArray;
34 class vtkPoints;
35 
36 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator :
37  public vtkCellIterator
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  bool IsDoneWithTraversal() override;
45  vtkIdType GetCellId() override;
46 
47 protected:
50 
51  void ResetToFirstCell() override;
52  void IncrementToNextCell() override;
53  void FetchCellType() override;
54  void FetchPointIds() override;
55  void FetchPoints() override;
56  void FetchFaces() override;
57 
58  friend class vtkUnstructuredGrid;
59  void SetUnstructuredGrid(vtkUnstructuredGrid *ug);
60 
61  unsigned char *CellTypeBegin;
62  unsigned char *CellTypePtr;
63  unsigned char *CellTypeEnd;
64 
70 
71  // Cache misses make updating ConnectivityPtr in IncrementToNextCell too
72  // expensive, so we wait to walk through the array until the point ids are
73  // needed. This variable keeps track of how far we need to increment.
75  void CatchUpSkippedCells();
76 
78 
79 private:
81  void operator=(const vtkUnstructuredGridCellIterator &) = delete;
82 };
83 
84 #endif //vtkUnstructuredGridCellIterator_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkUnstructuredGridCellIterator::SkippedCells
vtkIdType SkippedCells
Definition: vtkUnstructuredGridCellIterator.h:74
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkUnstructuredGridCellIterator::UnstructuredGridPoints
vtkSmartPointer< vtkPoints > UnstructuredGridPoints
Definition: vtkUnstructuredGridCellIterator.h:77
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkCellIterator::FetchPointIds
virtual void FetchPointIds()=0
Lookup the cell point ids in the data set and store them in this->PointIds.
vtkUnstructuredGridCellIterator::ConnectivityBegin
vtkIdType * ConnectivityBegin
Definition: vtkUnstructuredGridCellIterator.h:65
vtkSmartPointer< vtkPoints >
vtkCellIterator::FetchCellType
virtual void FetchCellType()=0
Lookup the cell type in the data set and store it in this->CellType.
vtkCellIterator::ResetToFirstCell
virtual void ResetToFirstCell()=0
Update internal state to point to the first cell.
vtkUnstructuredGridCellIterator
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
Definition: vtkUnstructuredGridCellIterator.h:36
vtkCellIterator::FetchFaces
virtual void FetchFaces()
Lookup the cell faces in the data set and store them in this->Points.
Definition: vtkCellIterator.h:191
vtkUnstructuredGridCellIterator::FacesLocsPtr
vtkIdType * FacesLocsPtr
Definition: vtkUnstructuredGridCellIterator.h:69
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkUnstructuredGridCellIterator::CellTypeBegin
unsigned char * CellTypeBegin
Definition: vtkUnstructuredGridCellIterator.h:61
vtkSmartPointer.h
vtkUnstructuredGridCellIterator::FacesLocsBegin
vtkIdType * FacesLocsBegin
Definition: vtkUnstructuredGridCellIterator.h:68
vtkCellIterator.h
vtkCellIterator::IsDoneWithTraversal
virtual bool IsDoneWithTraversal()=0
Returns false while the iterator is valid.
vtkUnstructuredGridCellIterator::FacesBegin
vtkIdType * FacesBegin
Definition: vtkUnstructuredGridCellIterator.h:67
vtkCellIterator::IncrementToNextCell
virtual void IncrementToNextCell()=0
Update internal state to point to the next cell.
vtkUnstructuredGridCellIterator::ConnectivityPtr
vtkIdType * ConnectivityPtr
Definition: vtkUnstructuredGridCellIterator.h:66
vtkCellIterator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridCellIterator::CellTypePtr
unsigned char * CellTypePtr
Definition: vtkUnstructuredGridCellIterator.h:62
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:87
vtkCellIterator::GetCellId
virtual vtkIdType GetCellId()=0
Get the id of the current cell.
vtkCellIterator
Efficient cell iterator for vtkDataSet topologies.
Definition: vtkCellIterator.h:80
vtkCellIterator::FetchPoints
virtual void FetchPoints()=0
Lookup the cell points in the data set and store them in this->Points.
vtkUnstructuredGridCellIterator::CellTypeEnd
unsigned char * CellTypeEnd
Definition: vtkUnstructuredGridCellIterator.h:63