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 =========================================================================*/
21 #ifndef vtkUnstructuredGridCellIterator_h
22 #define vtkUnstructuredGridCellIterator_h
23 
24 #include "vtkCommonDataModelModule.h" // For export macro
25 #include "vtkCellIterator.h"
26 #include "vtkSmartPointer.h" // For vtkSmartPointer
27 
28 class vtkCellArray;
31 class vtkPoints;
32 
33 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator :
34  public vtkCellIterator
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
41  bool IsDoneWithTraversal() VTK_OVERRIDE;
42  vtkIdType GetCellId() VTK_OVERRIDE;
43 
44 protected:
46  ~vtkUnstructuredGridCellIterator() VTK_OVERRIDE;
47 
48  void ResetToFirstCell() VTK_OVERRIDE;
49  void IncrementToNextCell() VTK_OVERRIDE;
50  void FetchCellType() VTK_OVERRIDE;
51  void FetchPointIds() VTK_OVERRIDE;
52  void FetchPoints() VTK_OVERRIDE;
53  void FetchFaces() VTK_OVERRIDE;
54 
55  friend class vtkUnstructuredGrid;
56  void SetUnstructuredGrid(vtkUnstructuredGrid *ug);
57 
58  unsigned char *CellTypeBegin;
59  unsigned char *CellTypePtr;
60  unsigned char *CellTypeEnd;
61 
62  vtkIdType *ConnectivityBegin;
63  vtkIdType *ConnectivityPtr;
64  vtkIdType *FacesBegin;
65  vtkIdType *FacesLocsBegin;
66  vtkIdType *FacesLocsPtr;
67 
68  // Cache misses make updating ConnectivityPtr in IncrementToNextCell too
69  // expensive, so we wait to walk through the array until the point ids are
70  // needed. This variable keeps track of how far we need to increment.
71  vtkIdType SkippedCells;
72  void CatchUpSkippedCells();
73 
74  vtkSmartPointer<vtkPoints> UnstructuredGridPoints;
75 
76 private:
77  vtkUnstructuredGridCellIterator(const vtkUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
78  void operator=(const vtkUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
79 };
80 
81 #endif //vtkUnstructuredGridCellIterator_h
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition: vtkType.h:345
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
a simple class to control print indentation
Definition: vtkIndent.h:33
dataset represents arbitrary combinations of all possible cell types
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:44
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:33