155 #ifndef vtkCellIterator_h
156 #define vtkCellIterator_h
160 #include "vtkCommonDataModelModule.h"
167 VTK_ABI_NAMESPACE_BEGIN
180 void InitTraversal();
261 virtual
void ResetToFirstCell() = 0;
266 virtual
void IncrementToNextCell() = 0;
271 virtual
void FetchCellType() = 0;
276 virtual
void FetchPointIds() = 0;
281 virtual
void FetchPoints() = 0;
289 virtual
void FetchFaces() {}
302 UninitializedFlag = 0x0,
311 this->CacheFlags = UninitializedFlag;
315 void SetCache(
unsigned char flags) { this->CacheFlags |= flags; }
317 bool CheckCache(
unsigned char flags) {
return (this->CacheFlags & flags) == flags; }
323 unsigned char CacheFlags;
343 if (!this->CheckCache(CellTypeFlag))
346 this->SetCache(CellTypeFlag);
354 if (!this->CheckCache(PointIdsFlag))
357 this->SetCache(PointIdsFlag);
365 if (!this->CheckCache(PointsFlag))
368 this->SetCache(PointsFlag);
376 if (!this->CheckCache(FacesFlag))
379 this->SetCache(FacesFlag);
388 if (!this->CheckCache(FacesFlag))
391 this->SetCache(FacesFlag);
402 return this->LegacyFacesContainer;
408 if (!this->CheckCache(PointIdsFlag))
411 this->SetCache(PointIdsFlag);
495 if (!this->CheckCache(FacesFlag))
498 this->SetCache(FacesFlag);
503 vtkGenericWarningMacro(
"Unknown cell type: " << this->CellType);
510 VTK_ABI_NAMESPACE_END
ValueType GetValue(vtkIdType valueIdx) const
Get the value at valueIdx.
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
object to represent cell connectivity
vtkIdType GetNumberOfCells() const override
Get the number of cells in the array.
void ExportLegacyFormat(vtkIdTypeArray *data)
Fill data with the old-style vtkCellArray data layout, e.g.
Efficient cell iterator for vtkDataSet topologies.
int GetCellDimension()
Get the current cell dimension (0, 1, 2, or 3).
virtual void FetchPoints()=0
Lookup the cell points in the data set and store them in this->Points.
virtual void FetchPointIds()=0
Lookup the cell point ids in the data set and store them in this->PointIds.
vtkIdType GetNumberOfFaces()
Return the number of faces in the current cell.
vtkIdList * GetFaces()
Get the faces for a polyhedral cell.
void InitTraversal()
Reset to the first cell.
vtkAbstractTypeMacro(vtkCellIterator, vtkObject)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPoints * GetPoints()
Get the points in the current cell.
vtkCellArray * GetCellFaces()
Get the faces for a polyhedral cell.
virtual void FetchCellType()=0
Lookup the cell type in the data set and store it in this->CellType.
vtkIdType GetNumberOfPoints()
Return the number of points in the current cell.
virtual void IncrementToNextCell()=0
Update internal state to point to the next cell.
virtual vtkIdType GetCellId()=0
Get the id of the current cell.
virtual void ResetToFirstCell()=0
Update internal state to point to the first cell.
vtkIdList * GetPointIds()
Get the ids of the points in the current cell.
int GetCellType()
Get the current cell type (e.g.
virtual void FetchFaces()
Lookup the cell faces in the data set and store them in this->Faces.
void GoToNextCell()
Increment to next cell.
virtual bool IsDoneWithTraversal()=0
Returns false while the iterator is valid.
provides thread-safe access to cells
list of point or cell ids
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
void Initialize()
Release memory and restore to unallocated state.
vtkIdType InsertNextId(vtkIdType vtkid)
Add the id specified to the end of the list.
a simple class to control print indentation
abstract base class for most VTK objects
represent and manipulate 3D points
VTKIOCATALYSTCONDUIT_EXPORT int GetCellType(const std::string &shape)
Get vtk cell type from conduit shape name throw a runtime_error on unsupported type.
@ VTK_QUADRATIC_HEXAHEDRON
@ VTK_HIGHER_ORDER_TETRAHEDRON
@ VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
@ VTK_LAGRANGE_QUADRILATERAL
@ VTK_TRIQUADRATIC_PYRAMID
@ VTK_TRIQUADRATIC_HEXAHEDRON
@ VTK_PARAMETRIC_TRI_SURFACE
@ VTK_LAGRANGE_HEXAHEDRON
@ VTK_HIGHER_ORDER_TRIANGLE
@ VTK_PARAMETRIC_QUAD_SURFACE
@ VTK_LAGRANGE_TETRAHEDRON
@ VTK_HIGHER_ORDER_PYRAMID
@ VTK_PARAMETRIC_HEX_REGION
@ VTK_BEZIER_QUADRILATERAL
@ VTK_QUADRATIC_LINEAR_WEDGE
@ VTK_HIGHER_ORDER_HEXAHEDRON
@ VTK_PARAMETRIC_TETRA_REGION
@ VTK_QUADRATIC_LINEAR_QUAD
@ VTK_BIQUADRATIC_QUADRATIC_WEDGE
@ VTK_HIGHER_ORDER_POLYGON
@ VTK_BIQUADRATIC_TRIANGLE
#define VTK_DEPRECATED_IN_9_4_0(reason)