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 =========================================================================*/
23 #ifndef vtkUnstructuredGridCellIterator_h
24 #define vtkUnstructuredGridCellIterator_h
25 
26 #include "vtkCommonDataModelModule.h" // For export macro
27 #include "vtkCellIterator.h"
28 #include "vtkSmartPointer.h" // For vtkSmartPointer
29 
30 class vtkCellArray;
33 class vtkPoints;
34 
36  public vtkCellIterator
37 {
38 public:
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
43  bool IsDoneWithTraversal();
45 
46 protected:
49 
50  void ResetToFirstCell();
51  void IncrementToNextCell();
52  void FetchCellType();
53  void FetchPointIds();
54  void FetchPoints();
55  void FetchFaces();
56 
57  friend class vtkUnstructuredGrid;
58  void SetUnstructuredGrid(vtkUnstructuredGrid *ug);
59 
60  unsigned char *CellTypeBegin;
61  unsigned char *CellTypePtr;
62  unsigned char *CellTypeEnd;
63 
69 
70  // Cache misses make updating ConnectivityPtr in IncrementToNextCell too
71  // expensive, so we wait to walk through the array until the point ids are
72  // needed. This variable keeps track of how far we need to increment.
74  void CatchUpSkippedCells();
75 
77 
78 private:
80  void operator=(const vtkUnstructuredGridCellIterator &); // Not implemented.
81 };
82 
83 #endif //vtkUnstructuredGridCellIterator_h
vtkSmartPointer< vtkPoints > UnstructuredGridPoints
int vtkIdType
Definition: vtkType.h:275
virtual void FetchCellType()=0
virtual void ResetToFirstCell()=0
Implementation of vtkCellIterator specialized for vtkUnstructuredGrid.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
virtual void IncrementToNextCell()=0
virtual vtkIdType GetCellId()=0
virtual void FetchPointIds()=0
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
virtual void FetchFaces()
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void FetchPoints()=0
Efficient cell iterator for vtkDataSet topologies.
static vtkObject * New()
virtual bool IsDoneWithTraversal()=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38