56 #ifndef vtkCellIterator_h
57 #define vtkCellIterator_h
61 #include "vtkCommonDataModelModule.h"
67 VTK_ABI_NAMESPACE_BEGIN
90 virtual bool IsDoneWithTraversal() = 0;
102 int GetCellDimension();
160 virtual void ResetToFirstCell() = 0;
165 virtual void IncrementToNextCell() = 0;
170 virtual void FetchCellType() = 0;
175 virtual void FetchPointIds() = 0;
180 virtual void FetchPoints() = 0;
201 UninitializedFlag = 0x0,
210 this->CacheFlags = UninitializedFlag;
214 void SetCache(
unsigned char flags) { this->CacheFlags |= flags; }
216 bool CheckCache(
unsigned char flags) {
return (this->CacheFlags & flags) == flags; }
222 unsigned char CacheFlags;
242 if (!this->CheckCache(CellTypeFlag))
245 this->SetCache(CellTypeFlag);
253 if (!this->CheckCache(PointIdsFlag))
256 this->SetCache(PointIdsFlag);
264 if (!this->CheckCache(PointsFlag))
267 this->SetCache(PointsFlag);
275 if (!this->CheckCache(FacesFlag))
278 this->SetCache(FacesFlag);
286 if (!this->CheckCache(FacesFlag))
289 this->SetCache(FacesFlag);
300 return this->LegacyFacesContainer;
306 if (!this->CheckCache(PointIdsFlag))
309 this->SetCache(PointIdsFlag);
386 if (!this->CheckCache(FacesFlag))
389 this->SetCache(FacesFlag);
394 vtkGenericWarningMacro(
"Unknown cell type: " << this->CellType);
401 VTK_ABI_NAMESPACE_END
402 #endif // vtkCellIterator_h
vtkIdType GetNumberOfFaces()
Return the number of faces in the current cell.
vtkIdType InsertNextId(vtkIdType id)
Add the id specified to the end of the list.
vtkIdType GetNumberOfCells() const override
Get the number of cells in the array.
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.
void Initialize()
Release memory and restore to unallocated state.
vtkCellArray * GetCellFaces()
Get the faces for a polyhedral cell.
ValueType GetValue(vtkIdType valueIdx) const
Get the value at valueIdx.
void ExportLegacyFormat(vtkIdTypeArray *data)
Fill data with the old-style vtkCellArray data layout, e.g.
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 GetNumberOfValues() const
Get the total number of values in the array.
void GoToNextCell()
Increment to next cell.
VTKIOCATALYSTCONDUIT_EXPORT int GetCellType(const std::string &shape)
Get vtk cell type from conduit shape name throw a runtime_error on unsupported type.
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.
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.
vtkIdList * GetSerializedCellFaces()
Get a serialized view of the faces for a polyhedral cell.
object to represent cell connectivity
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.