
#########
AxisTriad
#########

.. js: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/hoops/visualize-web/latest/prog_guide/viewing/scene_attributes/axis-triad-and-navcube.html>`_\ .
   
   
   Index
   =====
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~AxisTriad.disable`
   * :js:meth:`~AxisTriad.enable`
   * :js:meth:`~AxisTriad.getAnchor`
   * :js:meth:`~AxisTriad.getEnabled`
   * :js:meth:`~AxisTriad.getOverlayId`
   * :js:meth:`~AxisTriad.getSelectionAxis`
   * :js:meth:`~AxisTriad.insideOverlay`
   * :js:meth:`~AxisTriad.onClickSelection`
   * :js:meth:`~AxisTriad.setAnchor`
   * :js:meth:`~AxisTriad.setAxisColor`
   
   




Methods
=======

.. js:method:: AxisTriad.disable

   .. rst-class:: sig-pretty-signature
   
      | disable(): *Promise*
   
   Disables this [[AxisTriad]].
   
   **Returns**\ : *Promise*
   
      A promise that resolves on completion.
   
   



.. js:method:: AxisTriad.enable

   .. rst-class:: sig-pretty-signature
   
      | enable(): *Promise*
   
   Enables this [[AxisTriad]].
   
   **Returns**\ : *Promise*
   
      A promise that resolves on completion.
   
   



.. js:method:: AxisTriad.getAnchor

   .. rst-class:: sig-pretty-signature
   
      | getAnchor(): :js:data:`~OverlayAnchor`
   
   Gets the anchor position for this [[AxisTriad]]. Default position is in the lower left corner.
   
   **Returns**\ : :js:data:`~OverlayAnchor`
   
      The overlay anchor value of the triad.
   
   



.. js:method:: AxisTriad.getEnabled

   .. rst-class:: sig-pretty-signature
   
      | getEnabled(): *boolean*
   
   Gets the current state of this [[AxisTriad]].
   
   **Returns**\ : *boolean*
   
      ``true`` if enabled and ``false`` otherwise.
   
   



.. js:method:: AxisTriad.getOverlayId

   .. rst-class:: sig-pretty-signature
   
      | getOverlayId(): *number*
   
   Gets the overlay id. This id should be considered reserved and not be used by client applications.
   
   **Returns**\ : *number*
   
      The overlay id used by this [[AxisTriad]].
   
   



.. js:method:: AxisTriad.getSelectionAxis

   .. rst-class:: sig-pretty-signature
   
      | getSelectionAxis(**selectionItem**\ : (*None* \| :js:class:`SelectionItem <Selection.SelectionItem>`\ )): (*None* \| :js:data:`~Axis`\ )
   
   Checks if a selection is part of the axis triad, and return the corresponding axis.
   
   **Parameters**
   
      **selectionItem**\ : (*None* \| :js:class:`SelectionItem <Selection.SelectionItem>`\ )
   
         selection item to check.
   
   
   
   **Returns**\ : (*None* \| :js:data:`~Axis`\ )
   
      Axis if selected, null otherwise.
   
   



.. js:method:: AxisTriad.insideOverlay

   .. rst-class:: sig-pretty-signature
   
      | insideOverlay(**mousePos**\ : :js:class:`~Point2`\ ): *boolean*
   
   Determines whether or not a point is inside the axis triad overlay
   
   **Parameters**
   
      **mousePos**\ : :js:class:`~Point2`
   
   
   **Returns**\ : *boolean*
   
      Boolean indicating whether the provided point is inside the axis triad overlay
   
   



.. js:method:: AxisTriad.onClickSelection

   .. rst-class:: sig-pretty-signature
   
      | onClickSelection(**selection**\ : (*None* \| :js:class:`SelectionItem <Selection.SelectionItem>`\ )): *Promise*
   
   Called when the axis triad is clicked. Realigns the view along the axis selected by ``selection`` or does nothing if no axis is selected.
   
   **Parameters**
   
      **selection**\ : (*None* \| :js:class:`SelectionItem <Selection.SelectionItem>`\ )
   
   
   **Returns**\ : *Promise*
   



.. js:method:: AxisTriad.setAnchor

   .. rst-class:: sig-pretty-signature
   
      | setAnchor(**anchor**\ : :js:data:`~OverlayAnchor`\ ): *Promise*
   
   Sets the anchor position for this [[AxisTriad]].
   
   **Parameters**
   
      **anchor**\ : :js:data:`~OverlayAnchor`
   
         The anchor position.
   
   
   
   **Returns**\ : *Promise*
   
      A promise that resolves on completion.
   
   



.. js:method:: AxisTriad.setAxisColor

   .. rst-class:: sig-pretty-signature
   
      | setAxisColor(**axis**\ : :js:data:`~Axis`\ , **color**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets the color of one axis on this [[AxisTriad]]
   
   **Parameters**
   
      **axis**\ : :js:data:`~Axis`
   
         The axis that will change color
   
   
      **color**\ : :js:class:`~Color`
   
         The color to set
   
   
   
   **Returns**\ : *Promise*
   





