Introduction
vtkAxesActor is a hybrid 2D/3D actor used to represent 3D axes in a scene.
The user can define the geometry to use for the shaft or the tip,
and the user can set the text for the three axes. The text will appear
to follow the camera since it is implemented by means of vtkCaptionActor2D.
All of the functionality of the underlying vtkCaptionActor2D objects are accessible so that,
for instance, the font attributes of the axes text can be manipulated through vtkTextProperty.
Since this class inherits from vtkProp3D, one can apply a user transform to the underlying
geometry and the positioning of the labels. For example, a rotation transform could be used to
generate a left-handed axes representation.
See Also
Methods
extend
Method use to decorate a given object (publicAPI+model) with vtkAxesActor 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 |
IAxesActorInitialValues | No | (default: {}) |
getConfig
Get config object of the actor.
getXAxisColor
Retrieves the color of the X-axis.
getXConfig
Get config object of the X axis.
getYAxisColor
Retrieves the color of the Y-axis.
getYConfig
Get config object of the Y axis.
getZAxisColor
Retrieves the color of the Z-axis.
getZConfig
Get config object of the Z axis.
newInstance
Method use to create a new instance of vtkAxesActor.
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
IAxesActorInitialValues | No | for pre-setting some of its content |
setConfig
Set config object of the actor.
Argument | Type | Required | Description |
---|---|---|---|
config |
Yes |
setXAxisColor
Set X axis color.
Argument | Type | Required | Description |
---|---|---|---|
rgb |
RGBColor | Yes | An Array of the RGB color. |
setXConfig
Set config object of the X axis.
Argument | Type | Required | Description |
---|---|---|---|
config |
Yes |
setYAxisColor
Set Y axis color.
Argument | Type | Required | Description |
---|---|---|---|
rgb |
RGBColor | Yes | An Array of the RGB color. |
setYConfig
Set config object of the Y axis.
Argument | Type | Required | Description |
---|---|---|---|
config |
Yes |
setZAxisColor
Set Z axis color.
Argument | Type | Required | Description |
---|---|---|---|
rgb |
RGBColor | Yes | An Array of the RGB color. |
setZConfig
Set config object of the Z axis.
Argument | Type | Required | Description |
---|---|---|---|
config |
Yes |
update
Update the actor.
Source
import vtkActor, { IActorInitialValues } from '../Actor'; |
import macro from 'vtk.js/Sources/macros'; |