PlatonicSolidSource
Introduction
vtkPlatonicSolidSource can generate each of the five Platonic solids: tetrahedron, cube, octahedron, icosahedron, and dodecahedron. Each of the solids is placed inside a sphere centered at the origin with radius 1.0.
Usage
js
import vtkPlatonicSolidSource from '@kitware/vtk.js/Filters/Sources/RegularPolygonSource';
const regularPolygonSource = vtkPlatonicSolidSource.newInstance();
const polydata = regularPolygonSource.getOutputData();Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkPlatonicSolidSource 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 | IPlatonicSolidSourceInitialValues | No | (default: {}) |
getOutputPointsPrecision
Get the desired output precision.
Returns
| Type | Description |
|---|---|
| DesiredOutputPrecision |
getScale
Get the scale factor of the source.
getSolidType
Get the solid type of the source.
Returns
| Type | Description |
|---|---|
| SolidType |
newInstance
Method used to create a new instance of vtkPlatonicSolidSource.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IPlatonicSolidSourceInitialValues | No | for pre-setting some of its content |
requestData
Request data for the source.
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setOutputPointsPrecision
Set the desired output precision.
| Argument | Type | Required | Description |
|---|---|---|---|
outputPointsPrecision | DesiredOutputPrecision | Yes |
setScale
Set the scale factor of the source.
| Argument | Type | Required | Description |
|---|---|---|---|
scale | Number | Yes | The scale factor. |
setSolidType
Set the solid type of the source.
| Argument | Type | Required | Description |
|---|---|---|---|
solidType | SolidType | Yes |