VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBridgeCellIterator.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00026 #ifndef __vtkBridgeCellIterator_h 00027 #define __vtkBridgeCellIterator_h 00028 00029 #include "vtkBridgeExport.h" //for module export macro 00030 #include "vtkGenericCellIterator.h" 00031 00032 class vtkBridgeCell; 00033 class vtkBridgeDataSet; 00034 class vtkBridgeCell; 00035 class vtkIdList; 00036 class vtkBridgeDataSet; 00037 class vtkPoints; 00038 00039 class vtkBridgeCellIteratorStrategy; 00040 class vtkBridgeCellIteratorOnDataSet; 00041 class vtkBridgeCellIteratorOne; 00042 class vtkBridgeCellIteratorOnCellBoundaries; 00043 class vtkBridgeCellIteratorOnCellList; 00044 00045 class VTKTESTINGGENERICBRIDGE_EXPORT vtkBridgeCellIterator : public vtkGenericCellIterator 00046 { 00047 public: 00048 static vtkBridgeCellIterator *New(); 00049 vtkTypeMacro(vtkBridgeCellIterator,vtkGenericCellIterator); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 void Begin(); 00054 00056 int IsAtEnd(); 00057 00059 vtkGenericAdaptorCell *NewCell(); 00060 00063 void GetCell(vtkGenericAdaptorCell *c); 00064 00067 vtkGenericAdaptorCell *GetCell(); 00068 00071 void Next(); 00072 00074 00077 void InitWithDataSet(vtkBridgeDataSet *ds, 00078 int dim); 00080 00082 00085 void InitWithDataSetBoundaries(vtkBridgeDataSet *ds, 00086 int dim, 00087 int exterior_only); 00089 00091 00094 void InitWithOneCell(vtkBridgeDataSet *ds, 00095 vtkIdType cellid); 00097 00100 void InitWithOneCell(vtkBridgeCell *c); 00101 00103 00106 void InitWithCellBoundaries(vtkBridgeCell *cell, 00107 int dim); 00109 00111 00114 void InitWithCells(vtkIdList *cells, 00115 vtkBridgeDataSet *ds); 00117 00119 00124 void InitWithPoints(vtkPoints *coords, 00125 vtkIdList *pts, 00126 int dim, 00127 vtkIdType cellid); 00129 00130 protected: 00131 vtkBridgeCellIterator(); 00132 virtual ~vtkBridgeCellIterator(); 00133 00134 vtkBridgeCellIteratorStrategy *CurrentIterator; 00135 vtkBridgeCellIteratorOnDataSet *IteratorOnDataSet; 00136 vtkBridgeCellIteratorOne *IteratorOneCell; 00137 vtkBridgeCellIteratorOnCellBoundaries * IteratorOnCellBoundaries; 00138 vtkBridgeCellIteratorOnCellList *IteratorOnCellList; 00139 00140 vtkBridgeDataSet *DataSet; // the structure on which the objet iterates. 00141 vtkIdType Id; // the id at current position. 00142 int OneCell; // Is in one cell mode? 00143 vtkIdType Size; // size of the structure. 00144 vtkBridgeCell *Cell; // cell at current position. 00145 00146 private: 00147 vtkBridgeCellIterator(const vtkBridgeCellIterator&); // Not implemented 00148 void operator=(const vtkBridgeCellIterator&); // Not implemented 00149 }; 00150 00151 #endif