.. role:: ts-api-decorator

###################
CameraOrbitOperator
###################

.. js:module:: Operators.Camera
   :noindex:

.. container:: ts-api-section

   .. js:class:: CameraOrbitOperator



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Operators.Camera.CameraOrbitOperator.addMapping`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.clearMapping`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getBimOrbitEnabled`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getCameraRotationMomentumEnabled`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getMomentum`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getMomentumLossPerSecond`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getOrbitFallbackMode`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getOrbitTarget`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.getPrimaryButton`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.isAnimating`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.isCurrentlyAnimating`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setBimOrbitEnabled`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setCameraRotationMomentumEnabled`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setMapping`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setMomentumLossPerSecond`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setOrbitFallbackMode`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setOrbitTarget`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.setPrimaryButton`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.stopAnimation`
   * :js:meth:`~Operators.Camera.CameraOrbitOperator.supportsAnimation`





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

Methods
=======

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

addMapping
----------

.. js:method:: CameraOrbitOperator.addMapping( button, modifier)

   :param button: None
   :type button: Button
   :param modifier: None
   :type modifier: KeyModifiers


   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.


   :rtype: void

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

clearMapping
------------

.. js:method:: CameraOrbitOperator.clearMapping()



   Clears any button and key modifier mappings for the operator.


   :rtype: void

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

getBimOrbitEnabled
------------------

.. js:method:: CameraOrbitOperator.getBimOrbitEnabled()



   Returns true if BIM orbit is enabled.


   :rtype: boolean

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

getCameraRotationMomentumEnabled
--------------------------------

.. js:method:: CameraOrbitOperator.getCameraRotationMomentumEnabled()



   :rtype: boolean

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

getMomentum
-----------

.. js:method:: CameraOrbitOperator.getMomentum()



   :rtype: number

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

getMomentumLossPerSecond
------------------------

.. js:method:: CameraOrbitOperator.getMomentumLossPerSecond()



   :rtype: number

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

getOrbitFallbackMode
--------------------

.. js:method:: CameraOrbitOperator.getOrbitFallbackMode()



   Gets the orbit fallback mode.

   :returns: orbit fallback mode


   :rtype: OrbitFallbackMode

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

getOrbitTarget
--------------

.. js:method:: CameraOrbitOperator.getOrbitTarget()



   Gets the orbit target point.

   :returns: orbit target


   :rtype: Point3

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

getPrimaryButton
----------------

.. js:method:: CameraOrbitOperator.getPrimaryButton()





   :returns: the primary orbit button


   :rtype: Button

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

isAnimating
-----------

.. js:method:: CameraOrbitOperator.isAnimating()



   :rtype: boolean

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

isCurrentlyAnimating
--------------------

.. js:method:: CameraOrbitOperator.isCurrentlyAnimating()



   :rtype: boolean

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

setBimOrbitEnabled
------------------

.. js:method:: CameraOrbitOperator.setBimOrbitEnabled( bimOrbitEnabled)

   :param bimOrbitEnabled: None
   :type bimOrbitEnabled: boolean


   BIM orbit is intended to make orbiting building models easier.
   It slows the rotation speed, clamps vertical rotation to 180 degrees, and restricts horizontal rotation to rotate around the vertical axis.


   :rtype: void

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

setCameraRotationMomentumEnabled
--------------------------------

.. js:method:: CameraOrbitOperator.setCameraRotationMomentumEnabled( val)

   :param val: None
   :type val: boolean


   :rtype: void

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

setMapping
----------

.. js:method:: CameraOrbitOperator.setMapping( button, modifier)

   :param button: None
   :type button: Button
   :param modifier: None
   :type modifier: KeyModifiers


   Sets the button and key modifier mapping for the operator.


   :rtype: void

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

setMomentumLossPerSecond
------------------------

.. js:method:: CameraOrbitOperator.setMomentumLossPerSecond( amountLost)

   :param amountLost: Proportion of momentum lost per second
   :type amountLost: number


   Sets proportion of momentum lost per second if camera rotation momentum is enabled. At 0
   no momentum is lost and the camera will orbit indefinitely. Above 1 the camera will stop
   orbiting within a second of release. Only values greater than or equal to 0 are accepted.


   :rtype: void

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

setOrbitFallbackMode
--------------------

.. js:method:: CameraOrbitOperator.setOrbitFallbackMode( fallbackMode)

   :param fallbackMode: None
   :type fallbackMode: OrbitFallbackMode


   Sets the fallback mode. This is used to specify whether to orbit
   around a set target, the model center, or camera target.


   :rtype: void

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

setOrbitTarget
--------------

.. js:method:: CameraOrbitOperator.setOrbitTarget( orbitTarget)

   :param orbitTarget: None
   :type orbitTarget: Point3


   Sets the orbit target for the orbit fallback mode OrbitTarget.


   :rtype: void

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

setPrimaryButton
----------------

.. js:method:: CameraOrbitOperator.setPrimaryButton( button)

   :param button: None
   :type button: Button


   Sets the primary mouse button. When this button is pressed, we will orbit around the selected point on the model.
   If there is no selected point, the orbit fallback mode will be used for orbit.


   :rtype: void

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

stopAnimation
-------------

.. js:method:: CameraOrbitOperator.stopAnimation()



   :rtype: void

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

supportsAnimation
-----------------

.. js:method:: CameraOrbitOperator.supportsAnimation()



   :rtype: boolean

