AxisTriad
- class 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 view is created. For additional information on overlays please refer to the [[OverlayManager]].
More information can be found [here](https://docs.techsoft3d.com/communicator/latest/prog_guide/viewing/scene_attributes/axis-triad-and-navcube.html).
Methods
Methods
disable
- AxisTriad.disable()
Disables this [[AxisTriad]].
- Returns
A promise that resolves on completion.
- Return type
Promise <void>
enable
- AxisTriad.enable()
Enables this [[AxisTriad]].
- Returns
A promise that resolves on completion.
- Return type
Promise <void>
getAnchor
- AxisTriad.getAnchor()
Gets the anchor position for this [[AxisTriad]]. Default position is in the lower left corner.
- Returns
The overlay anchor value of the triad.
- Return type
OverlayAnchor
getEnabled
- AxisTriad.getEnabled()
Gets the current state of this [[AxisTriad]].
- Returns
true
if enabled andfalse
otherwise.- Return type
boolean
getOverlayId
- AxisTriad.getOverlayId()
Gets the overlay id. This id should be considered reserved and not be used by client applications.
- Returns
The overlay id used by this [[AxisTriad]].
- Return type
number
getSelectionAxis
- AxisTriad.getSelectionAxis(selectionItem)
- Arguments
selectionItem (
null | SelectionItem()
) – selection item to check.
Checks if a selection is part of the axis triad, and return the corresponding axis.
- Returns
Axis if selected, null otherwise.
- Return type
null | Axis
insideOverlay
onClickSelection
- AxisTriad.onClickSelection(selection)
- Arguments
selection (
null | SelectionItem()
) – None
Called when the axis triad is clicked. Realigns the view along the axis selected by
selection
or does nothing if no axis is selected.- Return type
Promise <void>
setAnchor
- AxisTriad.setAnchor(anchor)
- Arguments
anchor (
OverlayAnchor()
) – The anchor position.
Sets the anchor position for this [[AxisTriad]].
- Returns
A promise that resolves on completion.
- Return type
Promise <void>