Introduction
vtkArrow2DSource creates a cone centered at a specified point and pointing in a specified direction.
(By default, the center is the origin and the direction is the x-axis.) Depending upon the resolution of this object,
different representations are created. If resolution=0 a line is created; if resolution=1, a single triangle is created;
if resolution=2, two crossed triangles are created. For resolution > 2, a 3D cone (with resolution number of sides)
is created. It also is possible to control whether the bottom of the cone is capped with a (resolution-sided) polygon,
and to specify the height and thickness of the cone.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkArrow2DSource 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 |
IArrow2DSourceInitialValues | No | (default: {}) |
getBase
Get the cap the base of the cone with a polygon.
getCenter
Get the center of the cone.
getCenterByReference
Get the center of the cone.
getDirection
Get the orientation vector of the cone.
getDirectionByReference
Get the orientation vector of the cone.
getHeight
Get the height of the cone.
getThickness
Get the base thickness of the cone.
getWidth
Get the number of facets used to represent the cone.
newInstance
Method used to create a new instance of vtkArrow2DSource.
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
IArrow2DSourceInitialValues | No | for pre-setting some of its content |
requestData
Expose methods
Argument | Type | Required | Description |
---|---|---|---|
inData |
Yes | ||
outData |
Yes |
setBase
Turn on/off whether to cap the base of the cone with a polygon.
Argument | Type | Required | Description |
---|---|---|---|
base |
Number | Yes | The value of the |
setCenter
Set the center of the cone.
It is located at the middle of the axis of the cone.
!!! warning
This is not the center of the base of the cone!
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 cone.
It is located at the middle of the axis of the cone.
!!! warning
This is not the center of the base of the cone!
Argument | Type | Required | Description |
---|---|---|---|
center |
Vector3 | Yes | The center of the cone coordinates. |
setDirection
Set the direction for the arrow 2D.
Argument | Type | Required | Description |
---|---|---|---|
direction |
Vector3 | Yes | The direction coordinates. |
setDirection
Set the direction for the arrow.
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 arrow 2D.
Argument | Type | Required | Description |
---|---|---|---|
direction |
Vector3 | Yes | The direction coordinates. |
setHeight
Set the height of the cone.
This is the height along the cone in its specified direction.
Argument | Type | Required | Description |
---|---|---|---|
height |
Number | Yes | The height value. |
setThickness
Set the base thickness of the cone.
Argument | Type | Required | Description |
---|---|---|---|
thickness |
Number | Yes | The thickness value. |
setWidth
Set the number of facets used to represent the cone.
Argument | Type | Required | Description |
---|---|---|---|
width |
Number | Yes | The width value. |
Source
export const ShapeType = { |
import { vtkAlgorithm, vtkObject } from '../../../interfaces'; |
import macro from 'vtk.js/Sources/macros'; |