.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


##################
CameraZoomOperator
##################

.. js:class:: Operators.Camera.CameraZoomOperator

   
   Index
   =====
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Operators.Camera.CameraZoomOperator.addMapping`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.clearMapping`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getDollyZoomEnabled`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getMouseMoveZoomDelta`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getMouseMoveZoomInverted`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getMouseWheelAdjustCameraTarget`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getMouseWheelZoomDelta`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getMouseWheelZoomInverted`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getPreserveViewAngle`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.getZoomToMousePosition`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setDollyZoomEnabled`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMapping`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMouseMoveZoomDelta`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMouseMoveZoomInverted`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMouseWheelAdjustCameraTarget`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMouseWheelZoomDelta`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setMouseWheelZoomInverted`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setPreserveViewAngle`
   * :js:meth:`~Operators.Camera.CameraZoomOperator.setZoomToMousePosition`
   
   




Methods
=======

.. js:method:: Operators.Camera.CameraZoomOperator.addMapping

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | addMapping(**button**\ : :js:data:`~Button`\ , **modifier**\ : :js:data:`~KeyModifiers`\ ?): *void*
   
   Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.
   
   **Parameters**
   
      **button**\ : :js:data:`~Button`
   
      **modifier**\ : :js:data:`~KeyModifiers` = KeyModifiers.None
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.clearMapping

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | clearMapping(): *void*
   
   Clears any button and key modifier mappings for the operator.
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getDollyZoomEnabled

   .. rst-class:: sig-pretty-signature
   
      | getDollyZoomEnabled(): *boolean*
   
   Returns true if dolly zoom is enabled.
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getMouseMoveZoomDelta

   .. rst-class:: sig-pretty-signature
   
      | getMouseMoveZoomDelta(): *number*
   
   Gets the mouse move zoom delta
   
   **Returns**\ : *number*
   
      number
   
   



.. js:method:: Operators.Camera.CameraZoomOperator.getMouseMoveZoomInverted

   .. rst-class:: sig-pretty-signature
   
      | getMouseMoveZoomInverted(): *boolean*
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getMouseWheelAdjustCameraTarget

   .. rst-class:: sig-pretty-signature
   
      | getMouseWheelAdjustCameraTarget(): *boolean*
   
   Returns whether the camera target will be updated to the selection position while zooming. See [[setMouseWheelAdjustCameraTarget]].
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getMouseWheelZoomDelta

   .. rst-class:: sig-pretty-signature
   
      | getMouseWheelZoomDelta(): *number*
   
   Gets the scrollwheel zoom delta
   
   **Returns**\ : *number*
   
      number
   
   



.. js:method:: Operators.Camera.CameraZoomOperator.getMouseWheelZoomInverted

   .. rst-class:: sig-pretty-signature
   
      | getMouseWheelZoomInverted(): *boolean*
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getPreserveViewAngle

   .. rst-class:: sig-pretty-signature
   
      | getPreserveViewAngle(): *boolean*
   
   Gets whether to maintain a constant view angle while zooming. See [[setPreserveViewAngle]].
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraZoomOperator.getZoomToMousePosition

   .. rst-class:: sig-pretty-signature
   
      | getZoomToMousePosition(): *boolean*
   
   **Returns**\ : *boolean*
   
      boolean When true, the zoom will be towards the mouse position. When false, the zoom will be towards the center of the screen.
   
   



.. js:method:: Operators.Camera.CameraZoomOperator.setDollyZoomEnabled

   .. rst-class:: sig-pretty-signature
   
      | setDollyZoomEnabled(**dollyZoomEnabled**\ : *boolean*\ ): *void*
   
   When dolly zoom is enabled, the camera position will move towards the camera target when zooming.
   
   **Parameters**
   
      **dollyZoomEnabled**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMapping

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setMapping(**button**\ : :js:data:`~Button`\ , **modifier**\ : :js:data:`~KeyModifiers`\ ?): *void*
   
   Sets the button and key modifier mapping for the operator.
   
   **Parameters**
   
      **button**\ : :js:data:`~Button`
   
      **modifier**\ : :js:data:`~KeyModifiers` = KeyModifiers.None
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMouseMoveZoomDelta

   .. rst-class:: sig-pretty-signature
   
      | setMouseMoveZoomDelta(**delta**\ : *number*\ ): *void*
   
   Sets the delta to zoom when moving the mouse
   
   **Parameters**
   
      **delta**\ : *number*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMouseMoveZoomInverted

   .. rst-class:: sig-pretty-signature
   
      | setMouseMoveZoomInverted(**inverted**\ : *boolean*\ ): *void*
   
   When true, moving the mouse up will zoom towards the model.
   
   **Parameters**
   
      **inverted**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMouseWheelAdjustCameraTarget

   .. rst-class:: sig-pretty-signature
   
      | setMouseWheelAdjustCameraTarget(**value**\ : *boolean*\ ): *void*
   
   When enabled, the camera target will be updated to the selection position while zooming. This can provide a better zoom behavior in perspective projection mode, but comes at the cost of performing a selection on the model during each mouse scroll, which may not be ideal for performance on large models.
   
   This setting is disabled by default.
   
   **Parameters**
   
      **value**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMouseWheelZoomDelta

   .. rst-class:: sig-pretty-signature
   
      | setMouseWheelZoomDelta(**delta**\ : *number*\ ): *void*
   
   Sets the delta to zoom when scrolling
   
   **Parameters**
   
      **delta**\ : *number*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setMouseWheelZoomInverted

   .. rst-class:: sig-pretty-signature
   
      | setMouseWheelZoomInverted(**inverted**\ : *boolean*\ ): *void*
   
   When true, scrolling up will zoom towards the model.
   
   **Parameters**
   
      **inverted**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setPreserveViewAngle

   .. rst-class:: sig-pretty-signature
   
      | setPreserveViewAngle(**value**\ : *boolean*\ ): *void*
   
   Sets whether to maintain a constant view angle while zooming. If enabled, when zooming causes the camera's field of view to shrink or grow, the camera's position will also be moved toward or away from the target, respectively.
   
   This may prevent confusing camera behavior when perspective projection is used or might be used. When using only orthographic projection, it is better to disable this.
   
   If mouse wheel zoom is being using in conjunction with window zoom this setting should be the same in both.
   
   This setting is enabled by default.
   
   **Parameters**
   
      **value**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraZoomOperator.setZoomToMousePosition

   .. rst-class:: sig-pretty-signature
   
      | setZoomToMousePosition(**zoom**\ : *boolean*\ ): *void*
   
   When set, the zoom will be towards the mouse position. When not set, the zoom will be from the center of the screen.
   
   **Parameters**
   
      **zoom**\ : *boolean*
   
   
   **Returns**\ : *void*
   





