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

disable

AxisTriad.disable()

Disables this AxisTriad

Return type

DeprecatedPromise()

Returns

A promise that resolves on completion.

enable

AxisTriad.enable()

Enables this AxisTriad

Return type

DeprecatedPromise()

Returns

A promise that resolves on completion.

getAnchor

AxisTriad.getAnchor()

Gets the anchor position for this AxisTriad Default position is in the lower left corner.

Return type

OverlayAnchor

Returns

The overlay anchor value of the triad.

getEnabled

AxisTriad.getEnabled()

Gets the current state of this AxisTriad

Return type

boolean

Returns

true if enabled and false otherwise.

getOverlayId

AxisTriad.getOverlayId()

Gets the overlay id. This id should be considered reserved and not be used by client applications.

Return type

OverlayIndex

Returns

The overlay id used by this AxisTriad

getSelectionAxis

AxisTriad.getSelectionAxis(selectionItem)

Checks if a selection is part of the axis triad, and return the corresponding axis.

Arguments
Return type

Axis | null

Returns

Axis if selected, null otherwise.

insideOverlay

AxisTriad.insideOverlay(mousePos)

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

Arguments
Return type

boolean

Returns

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

onClickSelection

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
Return type

Promise <void>

setAnchor

AxisTriad.setAnchor(anchor)

Sets the anchor position for this AxisTriad

Arguments
Return type

Promise <void>

Returns

A promise that resolves on completion.

setAxisColor

AxisTriad.setAxisColor(axis, color)

Sets the color of one axis on this AxisTriad

Arguments
  • axis (Axis) – The axis that will change color

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

Return type

Promise <void>