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) VTK_OVERRIDE;
43 
44  bool IsDoneWithTraversal() VTK_OVERRIDE;
45  vtkIdType GetCellId() VTK_OVERRIDE;
46 
47 protected:
49  ~vtkUnstructuredGridCellIterator() VTK_OVERRIDE;
50 
51  void ResetToFirstCell() VTK_OVERRIDE;
52  void IncrementToNextCell() VTK_OVERRIDE;
53  void FetchCellType() VTK_OVERRIDE;
54  void FetchPointIds() VTK_OVERRIDE;
55  void FetchPoints() VTK_OVERRIDE;
56  void FetchFaces() VTK_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 
65  vtkIdType *ConnectivityBegin;
66  vtkIdType *ConnectivityPtr;
67  vtkIdType *FacesBegin;
68  vtkIdType *FacesLocsBegin;
69  vtkIdType *FacesLocsPtr;
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.
74  vtkIdType SkippedCells;
75  void CatchUpSkippedCells();
76 
77  vtkSmartPointer<vtkPoints> UnstructuredGridPoints;
78 
79 private:
80  vtkUnstructuredGridCellIterator(const vtkUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
81  void operator=(const vtkUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
82 };
83 
84 #endif //vtkUnstructuredGridCellIterator_h
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition: vtkType.h:287
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
a simple class to control print indentation
Definition: vtkIndent.h:39
dataset represents arbitrary combinations of all possible cell types
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:50
Efficient cell iterator for vtkDataSet topologies.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
Definition: vtkPoints.h:39