CellTypes
Introduction
vtkCellTypes provides a mapping from cell ids to cell types and to the location of the cell definition in the associated vtkCellArray.
Methods
allocate
Allocate memory for this array. Delete old storage only if necessary.
| Argument | Type | Required | Description |
|---|---|---|---|
sz | Number | No | (default: 512) |
ext | Number | No | (default: 1000) |
deepCopy
Standard DeepCopy method. Since this object contains no reference to other objects, there is no ShallowCopy.
| Argument | Type | Required | Description |
|---|---|---|---|
src | vtkCellTypes | Yes |
deleteCell
Delete cell by setting it to the empty cell type.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes |
extend
Method used to decorate a given object (publicAPI+model) with vtkCellTypes characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | ICellTypesInitialValues | No | (default: {}) |
getCellLocation
Return the location of the cell in the associated vtkCellArray.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes |
getCellType
Return the type of cell.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes |
getExtend
Get the growth increment of the arrays.
getLocationArray
Get the array of cell locations.
getLocationArrayByReference
Get the array of cell locations without copying it.
getMaxId
Get the maximum index inserted so far.
getNumberOfTypes
Return the number of types in the list.
getSize
Get the allocated size of the data.
getTypeArray
Get the array of cell types.
getTypeArrayByReference
Get the array of cell types without copying it.
insertCell
Add a cell at the specified id.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | |
type | Number | Yes | |
loc | Number | Yes |
insertNextCell
Add a cell to the object in the next available slot. Returns the id of the inserted cell.
| Argument | Type | Required | Description |
|---|---|---|---|
type | Number | Yes | |
loc | Number | Yes |
insertNextType
Add the type specified to the end of the list, with a location of -1. Returns the id of the inserted cell.
| Argument | Type | Required | Description |
|---|---|---|---|
type | Number | Yes |
isType
Return true if the type specified is contained in the list.
| Argument | Type | Required | Description |
|---|---|---|---|
type | Number | Yes |
newInstance
Method used to create a new instance of vtkCellTypes.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ICellTypesInitialValues | No | for pre-setting some of its content |
reset
Initialize the object without releasing memory.
setCellTypes
Specify a group of cell types.
| Argument | Type | Required | Description |
|---|---|---|---|
ncells | Number | Yes | |
cellTypes | Uint8Array | Yes | |
cellLocations | Uint32Array | Yes |