Skip to content

CellArray ​

Introduction ​

vtkCellArray stores dataset topologies as an explicit connectivity table listing the point ids that make up each cell.

See Also ​

vtkDataArray

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkCellArray characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesICellArrayInitialValuesNo(default: {})

extractCellSizes ​

Extracts cell sizes from a flattened cell array. The input cellArray follows the format: [size1, id11, id12, ..., size2, id21, id22, ...]. This function iterates through the array to collect only the size values, which is [size1, size2, ...].

ArgumentTypeRequiredDescription
cellArrayYes

Returns ​

TypeDescription
Array[number]An array of cell sizes.

getCell ​

Returns the point indices at the given location as a subarray.

ArgumentTypeRequiredDescription
locYes

getCellSizes ​

Get the sizes of the cells in this array.

ArgumentTypeRequiredDescription
recomputeBooleanNoRecompute the cell sizes.

getMaxCellSize ​

Get the maximum cell size.

getNumberOfCells ​

ArgumentTypeRequiredDescription
cellArrayYes

getNumberOfCells ​

Get the number of cells in the array.

ArgumentTypeRequiredDescription
recomputeBooleanNoRecompute the number of cells.

insertNextCell ​

Insert a cell to this array in the next available slot. This may re-allocate a new typed array if the current one is not large enough. If the final size of the array is known up-front, it is more efficient to call allocate() before calling insertNextCell() multiple times.

ArgumentTypeRequiredDescription
cellPointIdsArray[Number]YesThe list of point ids (NOT prefixed with the number of points)

Returns ​

TypeDescription
NumberIdx of where the cell was inserted

newInstance ​

Method used to create a new instance of vtkCellArray

ArgumentTypeRequiredDescription
initialValuesICellArrayInitialValuesNofor pre-setting some of its content

setData ​

Set the data of this array.

ArgumentTypeRequiredDescription
typedArrayArray[Number] or TypedArrayYesThe Array value.