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
31class vtkCellArray;
34class vtkPoints;
35
36class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridCellIterator :
37 public vtkCellIterator
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43
44 bool IsDoneWithTraversal() VTK_OVERRIDE;
45 vtkIdType GetCellId() VTK_OVERRIDE;
46
47protected:
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
79private:
81 void operator=(const vtkUnstructuredGridCellIterator &) VTK_DELETE_FUNCTION;
82};
83
84#endif //vtkUnstructuredGridCellIterator_h
object to represent cell connectivity
Definition: vtkCellArray.h:51
Efficient cell iterator for vtkDataSet topologies.
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
Hold a reference to a vtkObjectBase instance.
dynamic, self-adjusting array of unsigned char
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
static vtkUnstructuredGridCellIterator * New()
dataset represents arbitrary combinations of all possible cell types
int vtkIdType
Definition: vtkType.h:287