.. role:: ts-api-decorator

##############
VectorSettings
##############

.. js:module:: cee.usg
   :noindex:

.. container:: ts-api-section

   .. js:class:: VectorSettings

      Setting for how a vector result should be shown in the model.

      You can get the vector settings with the ``UnstructGridModel.vectorSettings`` property.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.usg.VectorSettings.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.usg.VectorSettings.arrowHeadRelativeLength`
   * :js:attr:`~cee.usg.VectorSettings.arrowHeadRelativeRadius`
   * :js:attr:`~cee.usg.VectorSettings.arrowShaftRelativeRadius`
   * :js:attr:`~cee.usg.VectorSettings.name`
   * :js:attr:`~cee.usg.VectorSettings.scaleFactor`
   * :js:attr:`~cee.usg.VectorSettings.scaleMode`
   * :js:attr:`~cee.usg.VectorSettings.singleVectorColor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.usg.VectorSettings.setScaleFactor`





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

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

.. container:: ts-api-section

   .. js:function:: VectorSettings.constructor()



      :rtype: VectorSettings



Accessors
=========

.. container:: ts-api-section

   .. js:function:: VectorSettings.arrowHeadRelativeLength()



      The length of the vector arrow head relative to the vector length.


      :rtype: number

   .. js:function:: VectorSettings.arrowHeadRelativeLength( headRelativeLength)

      :param headRelativeLength: None
      :type headRelativeLength: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: VectorSettings.arrowHeadRelativeRadius()



      The radius of the vector arrow head relative to the vector length.


      :rtype: number

   .. js:function:: VectorSettings.arrowHeadRelativeRadius( headRelativeRadius)

      :param headRelativeRadius: None
      :type headRelativeRadius: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: VectorSettings.arrowShaftRelativeRadius()



      The radius of the vector arrow shaft relative to the vector length.


      :rtype: number

   .. js:function:: VectorSettings.arrowShaftRelativeRadius( shaftRelativeRadius)

      :param shaftRelativeRadius: None
      :type shaftRelativeRadius: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: VectorSettings.name()



      The name of the vector result


      :rtype: string

   .. js:function:: VectorSettings.name( name)

      :param name: None
      :type name: string


      :rtype: void



.. container:: ts-api-section

   .. js:function:: VectorSettings.scaleFactor()



      Scaling factor to use on the vector result


      :rtype: number



.. container:: ts-api-section

   .. js:function:: VectorSettings.scaleMode()



      Scaling mode (absolute or relative) to use use for the vector result

      If set to ABSOLUTE_SCALING, the vector result will be multiplied by the scaling factor.

      If set to RELATIVE_SCALING, the scaling factor is assumed to be a fraction of the extent of the model
      bounding box, making the longest vector: boundingBox.extent().length()*scaleFactor


      :rtype: ScaleMode



.. container:: ts-api-section

   .. js:function:: VectorSettings.singleVectorColor()



      The color of the vector arrows


      :rtype: Color3

   .. js:function:: VectorSettings.singleVectorColor( color)

      :param color: None
      :type color: Color3


      :rtype: void



Methods
=======

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

setScaleFactor
--------------

.. js:method:: VectorSettings.setScaleFactor( mode, scaleFactor)

   :param mode: None
   :type mode: ScaleMode
   :param scaleFactor: None
   :type scaleFactor: number


   Set the scaling factor and scaling mode to use on the vector result

   If mode is ABSOLUTE_SCALING, the vector result will be multiplied by the scaleFactor.

   If mode is RELATIVE_SCALING, the scaleFactor is assumed to be a fraction of the extent of the model
   bounding box, making the longest vector: boundingBox.extent().length()*scaleFactor


   :rtype: void

