56 #ifndef vtkCellIterator_h
57 #define vtkCellIterator_h
60 #include "vtkCommonDataModelModule.h"
65 VTK_ABI_NAMESPACE_BEGIN
88 virtual bool IsDoneWithTraversal() = 0;
100 int GetCellDimension();
152 virtual void ResetToFirstCell() = 0;
157 virtual void IncrementToNextCell() = 0;
162 virtual void FetchCellType() = 0;
167 virtual void FetchPointIds() = 0;
172 virtual void FetchPoints() = 0;
193 UninitializedFlag = 0x0,
202 this->CacheFlags = UninitializedFlag;
206 void SetCache(
unsigned char flags) { this->CacheFlags |= flags; }
208 bool CheckCache(
unsigned char flags) {
return (this->CacheFlags & flags) == flags; }
213 unsigned char CacheFlags;
233 if (!this->CheckCache(CellTypeFlag))
236 this->SetCache(CellTypeFlag);
244 if (!this->CheckCache(PointIdsFlag))
247 this->SetCache(PointIdsFlag);
255 if (!this->CheckCache(PointsFlag))
258 this->SetCache(PointsFlag);
266 if (!this->CheckCache(FacesFlag))
269 this->SetCache(FacesFlag);
277 if (!this->CheckCache(PointIdsFlag))
280 this->SetCache(PointIdsFlag);
364 if (!this->CheckCache(FacesFlag))
367 this->SetCache(FacesFlag);
372 vtkGenericWarningMacro(
"Unknown cell type: " << this->CellType);
379 VTK_ABI_NAMESPACE_END
380 #endif // vtkCellIterator_h
vtkIdType GetNumberOfFaces()
Return the number of faces in the current cell.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void FetchCellType()=0
Lookup the cell type in the data set and store it in this->CellType.
virtual void ResetToFirstCell()=0
Update internal state to point to the first cell.
provides thread-safe access to cells
virtual void IncrementToNextCell()=0
Update internal state to point to the next cell.
vtkIdType GetId(vtkIdType i)
Return the id at location i.
void GoToNextCell()
Increment to next cell.
virtual void FetchPointIds()=0
Lookup the cell point ids in the data set and store them in this->PointIds.
a simple class to control print indentation
list of point or cell ids
vtkIdList * GetPointIds()
Get the ids of the points in the current cell.
vtkIdList * GetFaces()
Get the faces for a polyhedral cell.
virtual void FetchFaces()
Lookup the cell faces in the data set and store them in this->Faces.
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
int GetCellType(const Ioss::ElementTopology *topology)
Returns VTK celltype for a Ioss topology element.
int GetCellType()
Get the current cell type (e.g.
void InitTraversal()
Reset to the first cell.
vtkPoints * GetPoints()
Get the points in the current cell.
virtual void FetchPoints()=0
Lookup the cell points in the data set and store them in this->Points.
Efficient cell iterator for vtkDataSet topologies.
represent and manipulate 3D points
vtkIdType GetNumberOfPoints()
Return the number of points in the current cell.