.. role:: ts-api-decorator

##################
NavigationOperator
##################

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: NavigationOperator

      The ``Operator`` class is the base class for all operators. A name is required for all operators, and
      the name is used to identify the operator in the ``cee.OperatorStack``.

      Operators contain optional methods that correspond to the different events that may occur in the view. 
      When an operator is set on a ``View``, the operator can interact with its ownerView, but only that view.
      The ``cee.Viewer`` sets the events listeners internally, and then fires the corresponding Operator event 
      handler method when the event is recieved.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.NavigationOperator.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~cee.NavigationOperator.config`
   * :js:attr:`~cee.NavigationOperator.invertWalkZoom`
   * :js:attr:`~cee.NavigationOperator.minWalkTargetDistance`
   * :js:attr:`~cee.NavigationOperator.mouseWheelZoomAndWalkBehavior`
   * :js:attr:`~cee.NavigationOperator.name`
   * :js:attr:`~cee.NavigationOperator.ownerView`
   * :js:attr:`~cee.NavigationOperator.rotationAxis`
   * :js:attr:`~cee.NavigationOperator.rotationPoint`
   * :js:attr:`~cee.NavigationOperator.rotationSensitivity`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~cee.NavigationOperator.onAddedToView`
   * :js:meth:`~cee.NavigationOperator.onClick`
   * :js:meth:`~cee.NavigationOperator.onDblClick`
   * :js:meth:`~cee.NavigationOperator.onKeyDown`
   * :js:meth:`~cee.NavigationOperator.onKeyUp`
   * :js:meth:`~cee.NavigationOperator.onMouseDown`
   * :js:meth:`~cee.NavigationOperator.onMouseMove`
   * :js:meth:`~cee.NavigationOperator.onMouseUp`
   * :js:meth:`~cee.NavigationOperator.onPointerDown`
   * :js:meth:`~cee.NavigationOperator.onPointerMove`
   * :js:meth:`~cee.NavigationOperator.onPointerUp`
   * :js:meth:`~cee.NavigationOperator.onRemovedFromView`
   * :js:meth:`~cee.NavigationOperator.onTouchEnd`
   * :js:meth:`~cee.NavigationOperator.onTouchMove`
   * :js:meth:`~cee.NavigationOperator.onTouchStart`
   * :js:meth:`~cee.NavigationOperator.onWheel`
   * :js:meth:`~cee.NavigationOperator.resetRotationPoint`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: NavigationOperator.constructor( name)

      :param name: None
      :type name: string


      :rtype: NavigationOperator



Accessors
=========

.. container:: ts-api-section

   .. js:function:: NavigationOperator.config()



      The navigation configuration.
      Specify what should happen on mouse and touch input


      :rtype: OperatorConfig <NavigationType>

   .. js:function:: NavigationOperator.config( config)

      :param config: None
      :type config: OperatorConfig <NavigationType>


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.invertWalkZoom()



      Invert the zoom direction of the mouse wheel


      :rtype: boolean

   .. js:function:: NavigationOperator.invertWalkZoom( invert)

      :param invert: None
      :type invert: boolean


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.minWalkTargetDistance()



      The minimum walk target minTargetDistance

      For walk navigation, this is used to control how much the navigation should slow down when getting
      close to the rotation point. The walk speed is dynamic so you can interact with large models. 
      Depending on your model size, you might want to adjust this parameter.

      The default is undefined (automatic), which will be interpreted as 1/10 of the current view bounding box.


      :rtype: number

   .. js:function:: NavigationOperator.minWalkTargetDistance( minTargetDistance)

      :param minTargetDistance: None
      :type minTargetDistance: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.mouseWheelZoomAndWalkBehavior()



      Determine mouse wheel zoom and walk behavior

      This setting will only have effect if mouse wheel is configured to perform zoom or walk navigation.


      :rtype: MouseWheelZoomAndWalkBehavior

   .. js:function:: NavigationOperator.mouseWheelZoomAndWalkBehavior( behavior)

      :param behavior: None
      :type behavior: MouseWheelZoomAndWalkBehavior


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.name()



      The name of the operator. 
      Built-in operator names can be referenced by the ``StandardOperator`` enum.


      :rtype: string



.. container:: ts-api-section

   .. js:function:: NavigationOperator.ownerView()



      Returns the ``View`` that this operator is set on.
      If the operator is not on a view's ``cee.OperatorStack``, null is returned.


      :rtype: View



.. container:: ts-api-section

   .. js:function:: NavigationOperator.rotationAxis()



      An optional user provided axis around which the model should be rotated. 
      Set to null to not constrain rotation to an axis (default).


      :rtype: Vec3Like

   .. js:function:: NavigationOperator.rotationAxis( axis)

      :param axis: None
      :type axis: Vec3Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.rotationPoint()



      The current rotation point


      :rtype: Vec3Like

   .. js:function:: NavigationOperator.rotationPoint( rotationPoint)

      :param rotationPoint: None
      :type rotationPoint: Vec3Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: NavigationOperator.rotationSensitivity()



      Rotation sensitivity

      Sensitivity factor controlling how sensitive the mouse is when doing rotations.

      Default 1.0


      :rtype: number

   .. js:function:: NavigationOperator.rotationSensitivity( sensitivity)

      :param sensitivity: None
      :type sensitivity: number


      :rtype: void



Methods
=======

.. rst-class:: ts-api-section

onAddedToView
-------------

.. js:method:: NavigationOperator.onAddedToView()



   :rtype: void

.. rst-class:: ts-api-section

onClick
-------

.. js:method:: NavigationOperator.onClick( event)

   :param event: None
   :type event: MouseEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onDblClick
----------

.. js:method:: NavigationOperator.onDblClick( event)

   :param event: None
   :type event: MouseEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onKeyDown
---------

.. js:method:: NavigationOperator.onKeyDown( event)

   :param event: None
   :type event: KeyboardEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onKeyUp
-------

.. js:method:: NavigationOperator.onKeyUp( event)

   :param event: None
   :type event: KeyboardEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onMouseDown
-----------

.. js:method:: NavigationOperator.onMouseDown( event)

   :param event: None
   :type event: MouseEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onMouseMove
-----------

.. js:method:: NavigationOperator.onMouseMove( event)

   :param event: None
   :type event: MouseEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onMouseUp
---------

.. js:method:: NavigationOperator.onMouseUp( event)

   :param event: None
   :type event: MouseEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onPointerDown
-------------

.. js:method:: NavigationOperator.onPointerDown( event)

   :param event: None
   :type event: PointerEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onPointerMove
-------------

.. js:method:: NavigationOperator.onPointerMove( event)

   :param event: None
   :type event: PointerEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onPointerUp
-----------

.. js:method:: NavigationOperator.onPointerUp( event)

   :param event: None
   :type event: PointerEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onRemovedFromView
-----------------

.. js:method:: NavigationOperator.onRemovedFromView()



   :rtype: void

.. rst-class:: ts-api-section

onTouchEnd
----------

.. js:method:: NavigationOperator.onTouchEnd( event)

   :param event: None
   :type event: TouchEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onTouchMove
-----------

.. js:method:: NavigationOperator.onTouchMove( event)

   :param event: None
   :type event: TouchEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onTouchStart
------------

.. js:method:: NavigationOperator.onTouchStart( event)

   :param event: None
   :type event: TouchEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

onWheel
-------

.. js:method:: NavigationOperator.onWheel( event)

   :param event: None
   :type event: WheelEvent


   :rtype: OperatorEventStatus

.. rst-class:: ts-api-section

resetRotationPoint
------------------

.. js:method:: NavigationOperator.resetRotationPoint()



   Reset the rotation point to the bounding box center of all models in the owner view.
   If the operator does not have a valid view bounding box, the rotation point will not be 
   modified and the function will return false.


   :rtype: boolean

