Skip to content

Arrow2DSource

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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIArrow2DSourceInitialValuesNo(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.

ArgumentTypeRequiredDescription
initialValuesIArrow2DSourceInitialValuesNofor pre-setting some of its content

requestData

Expose methods

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setBase

Turn on/off whether to cap the base of the cone with a polygon.

ArgumentTypeRequiredDescription
baseNumberYesThe 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!

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe 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!

ArgumentTypeRequiredDescription
centerVector3YesThe center of the cone coordinates.

setDirection

Set the direction for the arrow 2D.

ArgumentTypeRequiredDescription
directionVector3YesThe direction coordinates.

setDirection

Set the direction for the arrow.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setDirectionFrom

Set the direction for the arrow 2D.

ArgumentTypeRequiredDescription
directionVector3YesThe direction coordinates.

setHeight

Set the height of the cone. This is the height along the cone in its specified direction.

ArgumentTypeRequiredDescription
heightNumberYesThe height value.

setThickness

Set the base thickness of the cone.

ArgumentTypeRequiredDescription
thicknessNumberYesThe thickness value.

setWidth

Set the number of facets used to represent the cone.

ArgumentTypeRequiredDescription
widthNumberYesThe width value.