|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   65 #ifndef vtkCellArrayIterator_h 
   66 #define vtkCellArrayIterator_h 
   68 #include "vtkCommonDataModelModule.h"  
   76 #include <type_traits>  
  103     this->CurrentCellId = cellId;
 
  104     this->NumberOfCells = this->CellArray->GetNumberOfCells();
 
  105     assert(cellId <= this->NumberOfCells);
 
  123     this->GoToCell(cellId);
 
  124     this->GetCurrentCell(numCellPts, cellPts);
 
  128     this->GoToCell(cellId);
 
  129     this->GetCurrentCell(cellIds);
 
  133     this->GoToCell(cellId);
 
  134     return this->GetCurrentCell();
 
  148     this->CurrentCellId = 0;
 
  149     this->NumberOfCells = this->CellArray->GetNumberOfCells();
 
  178     assert(this->CurrentCellId < this->NumberOfCells);
 
  180     if (this->CellArray->IsStorageShareable())
 
  182       this->CellArray->GetCellAtId(this->CurrentCellId, cellSize, cellPoints);
 
  186       this->CellArray->GetCellAtId(this->CurrentCellId, this->TempCell);
 
  187       cellSize = this->TempCell->GetNumberOfIds();
 
  188       cellPoints = this->TempCell->GetPointer(0);
 
  193     assert(this->CurrentCellId < this->NumberOfCells);
 
  194     this->CellArray->GetCellAtId(this->CurrentCellId, ids);
 
  198     assert(this->CurrentCellId < this->NumberOfCells);
 
  199     this->CellArray->GetCellAtId(this->CurrentCellId, this->TempCell);
 
  200     return this->TempCell;
 
  216     assert(this->CurrentCellId < this->NumberOfCells);
 
  217     this->CellArray->ReplaceCellAtId(this->CurrentCellId, list);
 
  227     assert(this->CurrentCellId < this->NumberOfCells);
 
  228     this->CellArray->ReplaceCellAtId(this->CurrentCellId, npts, pts);
 
  236     assert(this->CurrentCellId < this->NumberOfCells);
 
  237     this->CellArray->ReverseCellAtId(this->CurrentCellId);
 
  258 #endif // vtkCellArrayIterator_h 
  
void GoToNextCell()
Advance the forward iterator to the next cell.
void ReplaceCurrentCell(vtkIdType npts, const vtkIdType *pts)
Replace the current cell with the ids in pts.
void GetCurrentCell(vtkIdList *ids)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
void ReverseCurrentCell()
Reverses the order of the point ids in the current cell.
vtkIdList * GetCurrentCell()
vtkIdType GetCurrentCellId() const
Returns the id of the current cell during forward iteration.
abstract base class for most VTK objects
vtkCellArray * GetCellArray()
Return the vtkCellArray object over which iteration is occuring.
void GoToCell(vtkIdType cellId)
Intialize the iterator to a specific cell.
Encapsulate traversal logic for vtkCellArray.
bool IsDoneWithTraversal()
Returns true if the iterator has completed the traversal.
friend class vtkCellArrayIterator
a simple class to control print indentation
object to represent cell connectivity
list of point or cell ids
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReplaceCurrentCell(vtkIdList *list)
Specialized methods for performing operations on the vtkCellArray.
void GetCurrentCell(vtkIdType &cellSize, vtkIdType const *&cellPoints)
Returns the definition of the current cell during forward traversal.
void GoToFirstCell()
The following are methods supporting forward iteration.
void GetCellAtId(vtkIdType cellId, vtkIdType &numCellPts, vtkIdType const *&cellPts)
The following are methods supporting random access iteration.
void GetCellAtId(vtkIdType cellId, vtkIdList *cellIds)
vtkIdList * GetCellAtId(vtkIdType cellId)
vtkSmartPointer< vtkCellArray > CellArray
vtkNew< vtkIdList > TempCell