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


########################
CameraWindowZoomOperator
########################

.. js:class:: Operators.Camera.CameraWindowZoomOperator

   
   Index
   =====
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.addMapping`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.clearMapping`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.doZoom`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.getComputeTarget`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.getPreserveViewAngle`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.setComputeTarget`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.setMapping`
   * :js:meth:`~Operators.Camera.CameraWindowZoomOperator.setPreserveViewAngle`
   
   




Methods
=======

.. js:method:: Operators.Camera.CameraWindowZoomOperator.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.CameraWindowZoomOperator.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.CameraWindowZoomOperator.doZoom

   .. rst-class:: sig-pretty-signature
   
      | doZoom(**rectMin**\ : :js:class:`~Point2`\ , **rectMax**\ : :js:class:`~Point2`\ ): *Promise*
   
   **Parameters**
   
      **rectMin**\ : :js:class:`~Point2`
   
      **rectMax**\ : :js:class:`~Point2`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Operators.Camera.CameraWindowZoomOperator.getComputeTarget

   .. rst-class:: sig-pretty-signature
   
      | getComputeTarget(): *boolean*
   
   Returns whether a new camera target will be computed using selection. See [[setComputeTarget]]
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.Camera.CameraWindowZoomOperator.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.CameraWindowZoomOperator.setComputeTarget

   .. rst-class:: sig-pretty-signature
   
      | setComputeTarget(**compute**\ : *boolean*\ ): *void*
   
   When enabled, the camera target will be computed using selection 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 zoom operation, which may not be ideal for performance on large models.
   
   This setting is disabled by default.
   
   **Parameters**
   
      **compute**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.Camera.CameraWindowZoomOperator.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.CameraWindowZoomOperator.setPreserveViewAngle

   .. rst-class:: sig-pretty-signature
   
      | setPreserveViewAngle(**preserve**\ : *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 window zoom is being using in conjunction with mouse wheel zoom this setting should be the same in both.
   
   This setting is enabled by default.
   
   **Parameters**
   
      **preserve**\ : *boolean*
   
   
   **Returns**\ : *void*
   





