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

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 and false 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

AxisTriad.insideOverlay(mousePos)
Arguments

Determines whether or not a point is inside the axis triad overlay

Returns

Boolean indicating whether the provided point is inside the axis triad overlay

Return type

boolean

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>

setAxisColor

AxisTriad.setAxisColor(axis, color)
Arguments
  • axis (Axis()) – The axis that will change color

  • color (Color()) – The color to set

Sets the color of one axis on this [[AxisTriad]]

Return type

Promise <void>