Introduction
vtkArcSource is a source object that creates an arc defined by two endpoints
and a center. The number of segments composing the polyline is controlled by
setting the object resolution.
Usage
import vtkArcSource from '@kitware/vtk.js/Filters/Sources/ArcSource'; |
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkArcSource 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 |
IArcSourceInitialValues | No | (default: {}) |
getAngle
Get the angle of the arc.
getCenter
Get the center of the arc.
getCenterByReference
Get the center of the arc by reference.
getNegative
Get the negative flag of the arc.
getNormal
Get the normal vector of the arc.
getNormalByReference
Get the normal vector of the arc by reference.
getOutputPointsPrecision
Get the output points precision.
getPoint1
Get the first point of the arc.
getPoint1ByReference
Get the first point of the arc by reference.
getPoint2
Get the second point of the arc.
getPoint2ByReference
Get the second point of the arc by reference.
getPolarVector
Get the polar vector of the arc.
getPolarVectorByReference
Get the polar vector of the arc by reference.
getResolution
Get the resolution of the arc.
getUseNormalAndAngle
Get the use normal and angle flag.
newInstance
Method used to create a new instance of vtkArcSource.
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
IArcSourceInitialValues | No | for pre-setting some of its content |
requestData
Argument | Type | Required | Description |
---|---|---|---|
inData |
Yes | ||
outData |
Yes |
setAngle
Set the angle of the arc.
Argument | Type | Required | Description |
---|---|---|---|
angle |
Number | Yes | The angle in radians. |
setCenter
Set the center of the arc.
Argument | Type | Required | Description |
---|---|---|---|
center |
Vector3 | Yes | The center point’s coordinates. |
setCenterFrom
Set the center of the arc by reference.
Argument | Type | Required | Description |
---|---|---|---|
center |
Vector3 | Yes | The center point’s coordinates. |
setNegative
Set the negative flag of the arc.
Argument | Type | Required | Description |
---|---|---|---|
negative |
Boolean | Yes | If true, the arc will be drawn in the negative direction. |
setNormal
Set the normal vector of the arc.
Argument | Type | Required | Description |
---|---|---|---|
normal |
Vector3 | Yes | The normal vector’s coordinates. |
setNormalFrom
Set the normal vector of the arc by reference.
Argument | Type | Required | Description |
---|---|---|---|
normal |
Vector3 | Yes | The normal vector’s coordinates. |
setOutputPointsPrecision
Set the output points precision.
Argument | Type | Required | Description |
---|---|---|---|
precision |
DesiredOutputPrecision | Yes | The desired output precision. |
setPoint1
Set the first point of the arc.
Argument | Type | Required | Description |
---|---|---|---|
point1 |
Vector3 | Yes | The first point’s coordinates. |
setPoint1From
Set the first point of the arc by reference.
Argument | Type | Required | Description |
---|---|---|---|
point1 |
Vector3 | Yes | The first point’s coordinates. |
setPoint2
Set the second point of the arc.
Argument | Type | Required | Description |
---|---|---|---|
point2 |
Vector3 | Yes | The second point’s coordinates. |
setPoint2From
Set the second point of the arc by reference.
Argument | Type | Required | Description |
---|---|---|---|
point2 |
Vector3 | Yes | The second point’s coordinates. |
setPolarVector
Set the polar vector of the arc.
Argument | Type | Required | Description |
---|---|---|---|
polarVector |
Vector3 | Yes | The polar vector’s coordinates. |
setPolarVectorFrom
Set the polar vector of the arc by reference.
Argument | Type | Required | Description |
---|---|---|---|
polarVector |
Vector3 | Yes | The polar vector’s coordinates. |
setResolution
Set the resolution of the arc.
Argument | Type | Required | Description |
---|---|---|---|
resolution |
Number | Yes | The number of points in the arc. |
setUseNormalAndAngle
Set the use normal and angle flag.
Argument | Type | Required | Description |
---|---|---|---|
useNormalAndAngle |
Boolean | Yes | If true, the normal and angle will be used to define the arc. |
Source
import { DesiredOutputPrecision } from '../../../Common/DataModel/DataSetAttributes'; |
import macro from 'vtk.js/Sources/macros'; |