AxisTriad
- class Communicator.AxisTriad()
This class provides an interface to the axis triad which is enabled by default. The default functionality orients the camera based on the axis that is clicked. This triad is initialized and associated with an overlay when the viewer is created. For additional information on overlays please refer to the
OverlayManager
More information can be found here.
Methods
Methods
disable
- Communicator.AxisTriad.disable()
Disables this
AxisTriad
- Return type
Communicator.DeprecatedPromise
- Returns
A promise that resolves on completion.
enable
- Communicator.AxisTriad.enable()
Enables this
AxisTriad
- Return type
Communicator.DeprecatedPromise
- Returns
A promise that resolves on completion.
getAnchor
- Communicator.AxisTriad.getAnchor()
Gets the anchor position for this
AxisTriad
Default position is in the lower left corner.- Return type
Communicator.OverlayAnchor
- Returns
The overlay anchor value of the triad.
getEnabled
- Communicator.AxisTriad.getEnabled()
Gets the current state of this
AxisTriad
- Return type
boolean
- Returns
true
if enabled andfalse
otherwise.
getOverlayId
- Communicator.AxisTriad.getOverlayId()
Gets the overlay id. This id should be considered reserved and not be used by client applications.
- Return type
Communicator.OverlayIndex
- Returns
The overlay id used by this
AxisTriad
getSelectionAxis
- Communicator.AxisTriad.getSelectionAxis(selectionItem)
Checks if a selection is part of the axis triad, and return the corresponding axis.
- Arguments
selectionItem (
{ }()
) – selection item to check.
- Return type
{ }
- Returns
Axis if selected, null otherwise.
insideOverlay
- Communicator.AxisTriad.insideOverlay(mousePos)
Determines whether or not a point is inside the axis triad overlay
- Arguments
mousePos (
Communicator.Point2()
) –
- Return type
boolean
- Returns
Boolean indicating whether the provided point is inside the axis triad overlay
onClickSelection
- Communicator.AxisTriad.onClickSelection(selection)
Called when the axis triad is clicked. Realigns the view along the axis selected by
selection
or does nothing if no axis is selected.- Arguments
selection (
{ }()
) –
- Return type
Promise[void]
setAnchor
- Communicator.AxisTriad.setAnchor(anchor)
Sets the anchor position for this
AxisTriad
- Arguments
anchor (
Communicator.OverlayAnchor()
) – The anchor position.
- Return type
Promise[void]
- Returns
A promise that resolves on completion.
setAxisColor
- Communicator.AxisTriad.setAxisColor(axis, color)
Sets the color of one axis on this
AxisTriad
- Arguments
axis (
Communicator.Axis()
) – The axis that will change colorcolor (
Communicator.Color()
) – The color to set
- Return type
Promise[void]