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