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

.. js:class:: wv.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:`~wv.AxisTriad.disable`
   * :js:meth:`~wv.AxisTriad.enable`
   * :js:meth:`~wv.AxisTriad.getAnchor`
   * :js:meth:`~wv.AxisTriad.getEnabled`
   * :js:meth:`~wv.AxisTriad.getOverlayId`
   * :js:meth:`~wv.AxisTriad.getSelectionAxis`
   * :js:meth:`~wv.AxisTriad.insideOverlay`
   * :js:meth:`~wv.AxisTriad.onClickSelection`
   * :js:meth:`~wv.AxisTriad.setAnchor`
   * :js:meth:`~wv.AxisTriad.setAxisColor`
   
   



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.AxisTriad.disable

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



.. js:method:: wv.AxisTriad.enable

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



.. js:method:: wv.AxisTriad.getAnchor

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



.. js:method:: wv.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:: wv.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:: wv.AxisTriad.getSelectionAxis

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



.. js:method:: wv.AxisTriad.insideOverlay

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



.. js:method:: wv.AxisTriad.onClickSelection

      .. rst-class:: sig-pretty-signature
      
         | onClickSelection(**selection**\ : (*None* | :js:class:`SelectionItem <wv.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 <wv.Selection.SelectionItem>`\ )
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.AxisTriad.setAnchor

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



.. js:method:: wv.AxisTriad.setAxisColor

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




