Documentation for vtkCellArray

vtkCellArray - object to represent cell connectivity

Super Class: vtkObject

Description:

vtkCellArray is a supporting object that explicitly represents cell connectivity. The cell array structure is a raw integer list of the form: (n,id1,id2,...,idn, n,id1,id2,...,idn, ...) where n is the number of points in the cell, and id is a zero-offset index into an associated point list. Advantages of this data structure are its compactness, simplicity, and easy interface to external data. However, it is totally inadequate for random access. This functionality (when necessary) is accomplished by using the vtkCellTypes and vtkCellLinks objects to extend the definition of the data structure.

 

See Also:

vtkCellTypes vtkCellLinks

 

Methods:

void vtkCellArray ()
void vtkCellArray (const int ,const int )
void vtkCellArray (const vtkCellArray &)
void vtkCellArray ()
static vtkCellArray *New ()
const char *GetClassName ()
int Allocate (const int ,const int )
void Initialize ()
int GetNumberOfCells ()
int EstimateSize (int ,int )
void InitTraversal ()
int GetNextCell (int & ,int )
int GetSize ()
int GetNumberOfConnectivityEntries ()
void GetCell (int ,int & ,int )
int InsertNextCell (vtkCell *)
int InsertNextCell (int ,int *)
int InsertNextCell (vtkIdList *)
int InsertNextCell (int )
void InsertCellPoint (int )
void UpdateCellCount (int )
int GetInsertLocation (int )
int GetTraversalLocation (int )
void ReverseCell (int )
void ReplaceCell (int ,int ,int *)
int GetMaxCellSize ()
int *GetPointer ()
int *WritePointer (const int ,const int )
void Reset ()
void Squeeze ()
int InsertNextCell (vtkIdList &)

 

Detailed Method Descriptions:

Allocate memory and set the size to extend by.

int Allocate (const int ,const int )

Free any memory and reset to an empty state.

void Initialize ()

Get the number of cells in the array.

int GetNumberOfCells ()

Utility routines help manage memory of cell array. EstimateSize() returns a value used to initialize and allocate memory for array based on number of cells and maximum number of points making up cell. If every cell is the same size (in terms of number of points), then the memory estimate is guaranteed exact. (If not exact, use Squeeze() to reclaim any extra memory.)

int EstimateSize (int ,int )

A cell traversal methods that is more efficient than vtkDataSet traversal methods. InitTraversal() initializes the traversal of the list of cells.

void InitTraversal ()

A cell traversal methods that is more efficient than vtkDataSet traversal methods. GetNextCell() gets the next cell in the list. If end of list is encountered, 0 is returned.

int GetNextCell (int & ,int )

Get the size of the allocated connectivity array.

int GetSize ()

Get the total number of entries (i.e., data values) in the connectivity array. This may be much less than the allocated size (i.e., return value from GetSize().)

int GetNumberOfConnectivityEntries ()

Internal method used to retrieve a cell given an offset into the internal array.

void GetCell (int ,int & ,int )

Insert a cell object. Return the cell id of the cell.

int InsertNextCell (vtkCell *)

Create a cell by specifying the number of points and an array of point id's. Return the cell id of the cell.

int InsertNextCell (int ,int *)

Create a cell by specifying a list of point ids. Return the cell id of the cell.

int InsertNextCell (vtkIdList *)

Create cells by specifying count, and then adding points one at a time using method InsertCellPoint(). If you don't know the count initially, use the method UpdateCellCount() to complete the cell. Return the cell id of the cell.

int InsertNextCell (int )

Used in conjunction with InsertNextCell(int npts) to add another point to the list of cells.

void InsertCellPoint (int )

Used in conjunction with InsertNextCell(int npts) and InsertCellPoint() to update the number of points defining the cell.

void UpdateCellCount (int )

Computes the current insertion location within the internal array. Used in conjunction with GetCell(int loc,...).

int GetInsertLocation (int )

Computes the current traversal location within the internal array. Used in conjunction with GetCell(int loc,...).

int GetTraversalLocation (int )

Special method inverts ordering of current cell. Must be called carefully or the cell topology may be corrupted.

void ReverseCell (int )

Replace the point ids of the cell with a different list of point ids.

void ReplaceCell (int ,int ,int *)

Returns the size of the largest cell. The size is the number of points defining the cell.

int GetMaxCellSize ()

Get pointer to array of cell data.

int *GetPointer ()

Get pointer to data array for purpose of direct writes of data. Size is the total storage consumed by the cell array. ncells is the number of cells represented in the array.

int *WritePointer (const int ,const int )

Reuse list. Reset to initial condition.

void Reset ()

For legacy compatibility. Do not use.

void Squeeze ()
int InsertNextCell (vtkIdList &)