Introduction
vtkCylinderSource creates a polygonal cylinder centered at Center;
The axis of the cylinder is aligned along the global y-axis.
The height and radius of the cylinder can be specified, as well as the number of sides.
It is also possible to control whether the cylinder is open-ended or capped.
If you have the end points of the cylinder, you should use a vtkLineSource followed by a vtkTubeFilter instead of the vtkCylinderSource.
Usage
import vtkCylinderSource from '@kitware/vtk.js/Filters/Sources/CylinderSource'; |
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkCylinderSource 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 |
ICylinderSourceInitialValues | No | (default: {}) |
getCapping
Get the cap the base of the cylinder with a polygon.
getCenter
Get the center of the cylinder.
getCenterByReference
Get the center of the cylinder.
getDirection
Get the orientation vector of the cylinder.
getDirectionByReference
Get the orientation vector of the cylinder.
getHeight
Get the height of the cylinder.
getInitAngle
Get the initial angle along direction
getOtherRadius
Get the radius on Z axis. If not null and different from radius,
the cylinder base becomes an ellipse instead of a circle.
getRadius
Get the base radius of the cylinder.
getResolution
Get the number of facets used to represent the cylinder.
newInstance
Method used to create a new instance of vtkCylinderSource.
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
ICylinderSourceInitialValues | No | for pre-setting some of its content |
requestData
Argument | Type | Required | Description |
---|---|---|---|
inData |
Yes | ||
outData |
Yes |
setCapping
Turn on/off whether to cap the base of the cone with a polygon.
Argument | Type | Required | Description |
---|---|---|---|
capping |
Boolean | Yes | The capping value. |
setCenter
Set the center of the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setCenterFrom
Set the center of the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
center |
Vector3 | Yes | The center point’s coordinates. |
setDirection
Set the direction for the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
direction |
Vector3 | Yes | The direction coordinates. |
setDirection
Set the direction for the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setDirectionFrom
Set the direction for the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
direction |
Vector3 | Yes | The direction coordinates. |
setHeight
Set the height of the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
height |
Number | Yes | The height along the cylinder in its specified direction. |
setInitAngle
Set the initial angle along direction.
Argument | Type | Required | Description |
---|---|---|---|
initAngle |
Number | Yes | The initial angle in radian. |
setOtherRadius
Set the base Z radius of the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
radius |
Number | Yes | The radius of the cylinder in Z. |
setRadius
Set the base radius of the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
radius |
Number | Yes | The radius of the cylinder. |
setResolution
Set the number of facets used to represent the cylinder.
Argument | Type | Required | Description |
---|---|---|---|
resolution |
Number | Yes | The number of facets used to represent the cylinder. |
Source
import { vtkAlgorithm, vtkObject } from '../../../interfaces'; |
import macro from 'vtk.js/Sources/macros'; |