PolyData
Introduction
vtkPolyData is a dataset that represents a geometric structure consisting of vertices, lines, polygons, and/or strips.
Methods
buildCells
Create data structure that allows random access of cells.
buildLinks
Create upward links from points to cells that use each point. Enables topologically complex queries.
| Argument | Type | Required | Description |
|---|---|---|---|
initialSize | Number | Yes |
extend
Method used to decorate a given object (publicAPI+model) with vtkPolyData 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 | IPolyDataInitialValues | No | (default: {}) |
getCell
If you know the type of cell, you may provide it to improve performances.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | |
cellHint | Yes |
getCellEdgeNeighbors
Get the neighbors at an edge.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | The Id of the cell. |
point1 | Vector3 | Yes | The first point coordinate. |
point2 | Vector3 | Yes | The second point coordinate. |
getCellPoints
Get a list of point ids that define a cell.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | The Id of the cell. |
getCellType
Get the type of the cell
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | The Id of the cell. |
getCells
Get the cell array defining cells.
getLines
Get the cell array defining lines.
getLinks
Get the links between points and cells.
getMaxCellSize
Get the maximum cell size. Returns 0 if there is no cell.
getNumberOfCells
Determine the number of cells composing the polydata.
getNumberOfLines
Determine the number of lines composing the polydata.
getNumberOfPoints
Determine the number of points composing the polydata.
getNumberOfPolys
Determine the number of polys composing the polydata.
getNumberOfStrips
Determine the number of strips composing the polydata.
getNumberOfVerts
Determine the number of vertices composing the polydata.
getPointCells
Topological inquiry to get cells using point.
| Argument | Type | Required | Description |
|---|---|---|---|
ptId | Yes |
getPolys
Get the cell array defining polys.
getStrips
Get the cell array defining strips.
getVerts
Get the cell array defining vertices. If there are no vertices, an empty array will be returned (convenience to simplify traversal).
initialize
Empty the cells and initialize the point set.
newInstance
Method used to create a new instance of vtkPolyData.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IPolyDataInitialValues | No | for pre-setting some of its content |
setLines
Set the cell array defining lines.
| Argument | Type | Required | Description |
|---|---|---|---|
lines | vtkCellArray | Yes | The cell array defining lines. |
setPolys
Set the cell array defining polys.
| Argument | Type | Required | Description |
|---|---|---|---|
polys | vtkCellArray | Yes | The cell array defining polys. |
setStrips
Set the cell array defining strips.
| Argument | Type | Required | Description |
|---|---|---|---|
strips | vtkCellArray | Yes | The cell array defining strips. |
setVerts
Set the cell array defining vertices.
| Argument | Type | Required | Description |
|---|---|---|---|
verts | vtkCellArray | Yes | The cell array defining vertices. |