Cell
Introduction
vtkCell is an abstract method to define a cell
Methods
deepCopy
Copy this cell by completely copying internal data structures.
| Argument | Type | Required | Description |
|---|---|---|---|
cell | vtkCell | Yes | The cell you want to use. |
extend
Method used to decorate a given object (publicAPI+model) with vtkCell 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 | ICellInitialValues | No | (default: {}) |
getBounds
Get the bounds for this mapper as [xmin, xmax, ymin, ymax,zmin, zmax].
getLength2
Compute Length squared of cell (i.e., bounding box diagonal squared).
getNumberOfPoints
Get the number of points in the cell.
getParametricDistance
Get the distance of the parametric coordinate provided to the cell. If inside the cell, a distance of zero is returned. This is used during picking to get the correct cell picked. (The tolerance will occasionally allow cells to be picked who are not really intersected "inside" the cell.)
| Argument | Type | Required | Description |
|---|---|---|---|
pcoords | Vector3 | Yes | The coordinates of the point. |
getPoints
getPointsIds
initialize
Initialize the cell with point coordinates and cell point ids, example :
const points = vtkPoints.newInstance();
points.setData(Float32Array.from([0, 0, 0, 0, 0, 1, ..., 255, 255, 255]));
const pointIdsList = [13, 10, 235];
// Create cell
const triangle = vtkTriangle.newInstance();
// Initialize cell
triangle.initialize(points, pointIdsList);If pointIdsList is null, points are shallow copied and pointIdsList is generated as such: [0, 1, ..., N-1] where N is the number of points. If pointIdsList is not null, only pointIdsList point coordinates are copied into the cell. pointIdsList is shallow copied.
| Argument | Type | Required | Description |
|---|---|---|---|
points | vtkPoints | Yes | |
pointIdsList | Array[Number] | No |
newInstance
Method used to create a new instance of vtkCell.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ICellInitialValues | No | for pre-setting some of its content |