.. role:: ts-api-decorator

###############################
MeasureBodyBodyDistanceOperator
###############################

.. js:module:: Operators.Measure
   :noindex:

.. container:: ts-api-section

   .. js:class:: MeasureBodyBodyDistanceOperator

      This operator allows you to measure the minimum distance between two bodies.
      Moving the mouse over the model will highlight the body that will be measured.
      Clicking will select the first node to be measured, it will stay highlighted as
      you move the mouse away. Clicking a second time on a different body will begin the
      measurement. Once the measurement is completed you can move the mouse to position the
      measurement text box. The markup drawn represents the shortest distance between the
      two bodies you selected. Clicking a final time will place the measurement text box
      and finalize the measurement.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~Operators.Measure.MeasureBodyBodyDistanceOperator.constructor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Operators.Measure.MeasureBodyBodyDistanceOperator.addMapping`
   * :js:meth:`~Operators.Measure.MeasureBodyBodyDistanceOperator.clearMapping`
   * :js:meth:`~Operators.Measure.MeasureBodyBodyDistanceOperator.setMapping`





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

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

.. container:: ts-api-section

   .. js:function:: MeasureBodyBodyDistanceOperator.constructor( viewer, view, measureManager)

      :param viewer: None
      :type viewer: WebViewer
      :param view: None
      :type view: View
      :param measureManager: None
      :type measureManager: MeasureManager


      :rtype: MeasureBodyBodyDistanceOperator



Methods
=======

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

addMapping
----------

.. js:method:: MeasureBodyBodyDistanceOperator.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:: MeasureBodyBodyDistanceOperator.clearMapping()



   Clears any button and key modifier mappings for the operator.


   :rtype: void

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

setMapping
----------

.. js:method:: MeasureBodyBodyDistanceOperator.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

