35 #ifndef vtkCellArray_h 36 #define vtkCellArray_h 38 #include "vtkCommonDataModelModule.h" 59 {
return this->Ia->Allocate(sz,ext);}
90 {
return numCells*(1+maxPtsPerCell);}
118 {
return this->Ia->GetSize();}
126 {
return this->Ia->GetMaxId()+1;}
179 void UpdateCellCount(
int npts);
186 {
return (this->InsertLocation - npts - 1);};
192 {
return this->TraversalLocation;}
194 {this->TraversalLocation = loc;}
201 {
return(this->TraversalLocation-npts-1);}
224 int GetMaxCellSize();
230 {
return this->Ia->GetPointer(0);}
270 {this->Ia->Squeeze();}
280 unsigned long GetActualMemorySize();
302 vtkIdType *ptr = this->Ia->WritePointer(i, npts+1);
304 for ( *ptr++ = npts, i = 0; i < npts; i++)
309 this->NumberOfCells++;
310 this->InsertLocation += npts + 1;
312 return this->NumberOfCells - 1;
389 for (i=0; i < (npts/2); i++)
392 pts[i] = pts[npts-i-1];
402 for (
int i=0; i < npts; i++)
vtkIdType GetMaxId()
What is the maximum id currently in the array.
vtkIdType GetNumberOfPoints()
Return the number of points in the 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.
void InsertCellPoint(vtkIdType id)
Used in conjunction with InsertNextCell(int npts) to add another point to the list of cells.
void InsertValue(vtkIdType valueIdx, ValueType value)
Insert data at a specified position in the array.
ValueType * WritePointer(vtkIdType valueIdx, vtkIdType numValues)
Get the address of a particular data index.
ValueType * GetPointer(vtkIdType valueIdx)
Get the address of a particular data index.
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
void InitTraversal()
A cell traversal methods that is more efficient than vtkDataSet traversal methods.
dynamic, self-adjusting array of vtkIdType
void ReplaceCell(vtkIdType loc, int npts, const vtkIdType pts[])
Replace the point ids of the cell with a different list of point ids.
void Squeeze()
Reclaim any extra memory.
abstract class to specify cell behavior
void SetTraversalLocation(vtkIdType loc)
vtkIdType GetTraversalLocation(vtkIdType npts)
Computes the current traversal location within the internal array.
a simple class to control print indentation
vtkIdType GetNumberOfConnectivityEntries()
Get the total number of entries (i.e., data values) in the connectivity array.
vtkIdType InsertNextValue(ValueType value)
Insert data at the end of the array.
list of point or cell ids
ValueType GetValue(vtkIdType valueIdx) const
Get the value at valueIdx.
void SetValue(vtkIdType valueIdx, ValueType value)
Set the value at valueIdx to value.
vtkIdType EstimateSize(vtkIdType numCells, int maxPtsPerCell)
Utility routines help manage memory of cell array.
void ReverseCell(vtkIdType loc)
Special method inverts ordering of current cell.
#define VTK_SIZEHINT(...)
void Reset()
Reset to an empty state, without freeing any memory.
void UpdateCellCount(int npts)
Used in conjunction with InsertNextCell(int npts) and InsertCellPoint() to update the number of point...
vtkIdType TraversalLocation
vtkIdType InsertNextCell(vtkCell *cell)
Insert a cell object.
vtkIdType * WritePointer(const vtkIdType ncells, const vtkIdType size)
Get pointer to data array for purpose of direct writes of data.
object to represent cell connectivity
vtkIdTypeArray * GetData()
Return the underlying data as a data array.
vtkIdType GetSize()
Get the size of the allocated connectivity array.
int GetNextCell(vtkIdType &npts, vtkIdType *&pts)
A cell traversal methods that is more efficient than vtkDataSet traversal methods.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkIdType GetTraversalLocation()
Get/Set the current traversal location.
int Allocate(vtkIdType sz, vtkIdType ext=1000)
Allocate memory and set the size to extend by.
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType *&pts)
Internal method used to retrieve a cell given an offset into the internal array.