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

.. js:class:: cee.ug.VectorSettings

   Specification of how to render vector arrows for the given result on the model, on cutting planes and on isosurfaces.
   
   Use this object to control the visual appearance of vector arrows in the 3D viewer. With :js:func:`colorMode <cee.ug.VectorSettings.colorMode>` you can specify whether vectors should use a :js:func:`singleVectorColor <cee.ug.VectorSettings.singleVectorColor>`\ , the color mapping from the object's scalar fringes, or the color mapping from a provided scalar result ID. You can also setup relative or absolute scaling with :js:func:`scaleMode <cee.ug.VectorSettings.scaleMode>` and perform filtering and clamping of the vector magnitudes (lengths), with :js:meth:`setFilteringRange <cee.ug.VectorSettings.setFilteringRange>` and :js:meth:`setClampingRange <cee.ug.VectorSettings.setClampingRange>` respectively.
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.ug.VectorSettings.anisotropicScaleFactor`
   * :js:func:`~cee.ug.VectorSettings.arrowHeadRelativeLength`
   * :js:func:`~cee.ug.VectorSettings.arrowHeadRelativeRadius`
   * :js:func:`~cee.ug.VectorSettings.arrowShaftRelativeRadius`
   * :js:func:`~cee.ug.VectorSettings.clampingRangeMaximum`
   * :js:func:`~cee.ug.VectorSettings.clampingRangeMinimum`
   * :js:func:`~cee.ug.VectorSettings.colorMode`
   * :js:func:`~cee.ug.VectorSettings.drawMaxCount`
   * :js:func:`~cee.ug.VectorSettings.drawMode`
   * :js:func:`~cee.ug.VectorSettings.drawSkipBy`
   * :js:func:`~cee.ug.VectorSettings.dynamicSymmetricArrowsScalarId`
   * :js:func:`~cee.ug.VectorSettings.filteringRangeMaximum`
   * :js:func:`~cee.ug.VectorSettings.filteringRangeMinimum`
   * :js:func:`~cee.ug.VectorSettings.isClampingEnabled`
   * :js:func:`~cee.ug.VectorSettings.isFilteringEnabled`
   * :js:func:`~cee.ug.VectorSettings.mapScalarResultId`
   * :js:func:`~cee.ug.VectorSettings.nodeAveragedValues`
   * :js:func:`~cee.ug.VectorSettings.projectVectorsOnSurface`
   * :js:func:`~cee.ug.VectorSettings.resultId`
   * :js:func:`~cee.ug.VectorSettings.scaleFactor`
   * :js:func:`~cee.ug.VectorSettings.scaleMode`
   * :js:func:`~cee.ug.VectorSettings.singleVectorColor`
   * :js:func:`~cee.ug.VectorSettings.vectorType`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.ug.VectorSettings.disableClamping`
   * :js:meth:`~cee.ug.VectorSettings.disableFiltering`
   * :js:meth:`~cee.ug.VectorSettings.getAsProperties`
   * :js:meth:`~cee.ug.VectorSettings.setClampingRange`
   * :js:meth:`~cee.ug.VectorSettings.setFilteringRange`
   * :js:meth:`~cee.ug.VectorSettings.setFromProperties`
   * :js:meth:`~cee.ug.VectorSettings.setVectorTypeArrow`
   * :js:meth:`~cee.ug.VectorSettings.setVectorTypeDynamicSymmetricArrow`
   * :js:meth:`~cee.ug.VectorSettings.setVectorTypeReverseSymmetricArrow`
   * :js:meth:`~cee.ug.VectorSettings.setVectorTypeSymmetricArrow`
   
   



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: cee.ug.VectorSettings.anisotropicScaleFactor

      .. rst-class:: sig-pretty-signature
      
         | *get* anisotropicScaleFactor(): :js:class:`Vec3Like <cee.Vec3Like>`
      
      The anisotropic scaling factor to use for the vector arrows. The provided value will scale each vector result component by the respective scaling factor. This factor is interpreted as either absolute or relative based on :js:func:`scaleMode <cee.ug.VectorSettings.scaleMode>`\ . Returns null if :js:func:`scaleFactor <cee.ug.VectorSettings.scaleFactor>` is set and in use (default).
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* anisotropicScaleFactor(**anisotropicScaleFactor**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *void*
      
      **Parameters**
      
      
         **anisotropicScaleFactor**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.arrowHeadRelativeLength

      .. rst-class:: sig-pretty-signature
      
         | *get* arrowHeadRelativeLength(): *number*
      
      The length of the vector arrow head relative to the vector length.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* arrowHeadRelativeLength(**headRelativeLength**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **headRelativeLength**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.arrowHeadRelativeRadius

      .. rst-class:: sig-pretty-signature
      
         | *get* arrowHeadRelativeRadius(): *number*
      
      The radius of the vector arrow head relative to the vector length.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* arrowHeadRelativeRadius(**headRelativeRadius**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **headRelativeRadius**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.arrowShaftRelativeRadius

      .. rst-class:: sig-pretty-signature
      
         | *get* arrowShaftRelativeRadius(): *number*
      
      The radius of the vector arrow shaft relative to the vector length.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* arrowShaftRelativeRadius(**shaftRelativeRadius**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **shaftRelativeRadius**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.clampingRangeMaximum

      .. rst-class:: sig-pretty-signature
      
         | *get* clampingRangeMaximum(): *number*
      
      The maximum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.clampingRangeMinimum

      .. rst-class:: sig-pretty-signature
      
         | *get* clampingRangeMinimum(): *number*
      
      The minimum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.colorMode

      .. rst-class:: sig-pretty-signature
      
         | *get* colorMode(): :js:data:`VectorColorMode <cee.ug.VectorColorMode>`
      
      The coloring mode of the vector arrows. This can be either single color, as specified by :js:func:`singleVectorColor <cee.ug.VectorSettings.singleVectorColor>`\ , color by fringes, where the color is taken from the scalar result in the object on which the vector arrows are mapped, or color by a given result ID, where the color is taken from the scalar results referenced by :js:func:`mapScalarResultId <cee.ug.VectorSettings.mapScalarResultId>`\ .
      
      **Returns**\ : :js:data:`VectorColorMode <cee.ug.VectorColorMode>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* colorMode(**colorMode**\ : :js:data:`VectorColorMode <cee.ug.VectorColorMode>`\ ): *void*
      
      **Parameters**
      
      
         **colorMode**\ : :js:data:`VectorColorMode <cee.ug.VectorColorMode>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.drawMaxCount

      .. rst-class:: sig-pretty-signature
      
         | *get* drawMaxCount(): *number*
      
      If there are more vectors than specified with setDrawMaximumCount(), every n'th vector arrow will be skipped to reduce the number of arrows to within maximum count.
      
      When set to 0, all vectors will be drawn
      
      Note! If drawSkipBy is set to value other than 0, this skip by value will be used and maximum count ignored!
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* drawMaxCount(**skipBy**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **skipBy**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.drawMode

      .. rst-class:: sig-pretty-signature
      
         | *get* drawMode(): :js:data:`VectorDrawMode <cee.ug.VectorDrawMode>`
      
      The rendering mode for the vector result.
      
      Vectors can either be drawn as 3D arrows (default) or a simplified version
      
      **Returns**\ : :js:data:`VectorDrawMode <cee.ug.VectorDrawMode>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* drawMode(**drawMode**\ : :js:data:`VectorDrawMode <cee.ug.VectorDrawMode>`\ ): *void*
      
      **Parameters**
      
      
         **drawMode**\ : :js:data:`VectorDrawMode <cee.ug.VectorDrawMode>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.drawSkipBy

      .. rst-class:: sig-pretty-signature
      
         | *get* drawSkipBy(): *number*
      
      Get number of vectors to skip between each vector that is drawn. Default 0.
      
      If set > 0, will draw every n'th vector. No guarantee of an even distribution.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* drawSkipBy(**skipBy**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **skipBy**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.dynamicSymmetricArrowsScalarId

      .. rst-class:: sig-pretty-signature
      
         | *get* dynamicSymmetricArrowsScalarId(): *number*
      
      The id of the scalar result used to determine directions of dynamic symmetric arrows. Use :js:meth:`setVectorTypeDynamicSymmetricArrow <cee.ug.VectorSettings.setVectorTypeDynamicSymmetricArrow>` to set this value.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.filteringRangeMaximum

      .. rst-class:: sig-pretty-signature
      
         | *get* filteringRangeMaximum(): *number*
      
      The maximum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.filteringRangeMinimum

      .. rst-class:: sig-pretty-signature
      
         | *get* filteringRangeMinimum(): *number*
      
      The minimum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.isClampingEnabled

      .. rst-class:: sig-pretty-signature
      
         | *get* isClampingEnabled(): *boolean*
      
      Whether clamping of this vector result is enabled.
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.ug.VectorSettings.isFilteringEnabled

      .. rst-class:: sig-pretty-signature
      
         | *get* isFilteringEnabled(): *boolean*
      
      Whether filtering of this vector result is enabled.
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.ug.VectorSettings.mapScalarResultId

      .. rst-class:: sig-pretty-signature
      
         | *get* mapScalarResultId(): *number*
      
      The scalar results ID to reference for coloring vectors if :js:func:`colorMode <cee.ug.VectorSettings.colorMode>` is COLOR_BY_MAP_SCALAR.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* mapScalarResultId(**scalarResultId**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **scalarResultId**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.nodeAveragedValues

      .. rst-class:: sig-pretty-signature
      
         | *get* nodeAveragedValues(): *boolean*
      
      Specify if the vector result should be shown as a node averaged result or not.
      
      If false (default) the result is shown as is computed. If true, a node averaged result will be shown that is derived from the original result.
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* nodeAveragedValues(**useNodeAveraging**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **useNodeAveraging**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.projectVectorsOnSurface

      .. rst-class:: sig-pretty-signature
      
         | *get* projectVectorsOnSurface(): *boolean*
      
      Set if the vectors should be projected onto the model surface or not (default is false)
      
      If set to true, all vectors are projected onto the surface using the surface normal in that point to define the plane to project onto.
      
      This works in the similar way to the CuttingPlane::setProjectVectorsOnPlane() method.
      
      NOTE: It is only in effect when having PER_NODE and PER_ELEMENT_NODE vector results
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* projectVectorsOnSurface(**project**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **project**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.resultId

      .. rst-class:: sig-pretty-signature
      
         | *get* resultId(): *number*
      
      The id (>=0) of the vector result. This id corresponds to the id in :js:data:`ModelDirectory.vectorResultArray <cee.ug.ModelDirectory.vectorResultArray>`\ .
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.VectorSettings.scaleFactor

      .. rst-class:: sig-pretty-signature
      
         | *get* scaleFactor(): *number*
      
      The scaling factor to use for the vector arrows. This factor is interpreted as either absolute or relative based on :js:func:`scaleMode <cee.ug.VectorSettings.scaleMode>`\ . Returns undefined if :js:func:`anisotropicScaleFactor <cee.ug.VectorSettings.anisotropicScaleFactor>` is set and in use.
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* scaleFactor(**scaleFactor**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **scaleFactor**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.scaleMode

      .. rst-class:: sig-pretty-signature
      
         | *get* scaleMode(): :js:data:`VectorScaleMode <cee.ug.VectorScaleMode>`
      
      The scaling mode to use for the vector arrows (absolute or relative).
      
      **Returns**\ : :js:data:`VectorScaleMode <cee.ug.VectorScaleMode>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* scaleMode(**scaleMode**\ : :js:data:`VectorScaleMode <cee.ug.VectorScaleMode>`\ ): *void*
      
      **Parameters**
      
      
         **scaleMode**\ : :js:data:`VectorScaleMode <cee.ug.VectorScaleMode>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.singleVectorColor

      .. rst-class:: sig-pretty-signature
      
         | *get* singleVectorColor(): :js:class:`Color3Like <cee.Color3Like>`
      
      The color to use for the vectors if :js:func:`colorMode <cee.ug.VectorSettings.colorMode>` is SINGLE.
      
      **Returns**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* singleVectorColor(**singleColor**\ : :js:class:`Color3Like <cee.Color3Like>`\ ): *void*
      
      **Parameters**
      
      
         **singleColor**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.vectorType

      .. rst-class:: sig-pretty-signature
      
         | *get* vectorType(): :js:data:`VectorType <cee.ug.VectorType>`
      
      The visualization type for the vector result. Use the methods :js:meth:`setVectorTypeArrow <cee.ug.VectorSettings.setVectorTypeArrow>`\ , :js:meth:`setVectorTypeSymmetricArrow <cee.ug.VectorSettings.setVectorTypeSymmetricArrow>` etc to set this property.
      
      **Returns**\ : :js:data:`VectorType <cee.ug.VectorType>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: cee.ug.VectorSettings.disableClamping

      .. rst-class:: sig-pretty-signature
      
         | disableClamping(): *void*
      
      Disables any clamping of the vectors. They will be rendered with the length specified by the vector result and scaling.
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.disableFiltering

      .. rst-class:: sig-pretty-signature
      
         | disableFiltering(): *void*
      
      Disables any filtering of the vectors. They will be rendered with the length specified by the vector result and scaling.
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.getAsProperties

      .. rst-class:: sig-pretty-signature
      
         | getAsProperties(): :js:class:`VectorSettingsProperties <cee.ug.VectorSettingsProperties>`
      
      Gets the settings for this object as a Plain Old JavaScript Object (POJO).
      
      **Returns**\ : :js:class:`VectorSettingsProperties <cee.ug.VectorSettingsProperties>`
      



.. js:method:: cee.ug.VectorSettings.setClampingRange

      .. rst-class:: sig-pretty-signature
      
         | setClampingRange(**clampMinLength**\ : *number*\ , **clampMaxLength**\ : *number*\ ): *void*
      
      Specifies to clamp all vectors between the given min and max length.
      
      When enabled, all vectors will be clamped into the given <clampMinLength, clampMaxLength> range. So if clampMinLength = clampMaxLength, all vectors will be drawn with the same length, regardless of the magnitude of the vector.
      
      Note: The clamping is done before any scaling.
      
      **Parameters**
      
      
         **clampMinLength**\ : *number*
      
         **clampMaxLength**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setFilteringRange

      .. rst-class:: sig-pretty-signature
      
         | setFilteringRange(**minLength**\ : *number*\ , **maxLength**\ : *number*\ ): *void*
      
      Specifies to show only the vectors whose length lies within the given range.
      
      When enabled, only vectors whose length is within the given filter range <filterMinLength, filterMaxLength> will be drawn. All other vectors will be discarded and not drawn.
      
      Note: The filtering is done before any scaling.
      
      **Parameters**
      
      
         **minLength**\ : *number*
      
         **maxLength**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setFromProperties

      .. rst-class:: sig-pretty-signature
      
         | setFromProperties(**props**\ : *Partial*\ ): *void*
      
      Applies the settings in the given properties object to this vector settings
      
      **Parameters**
      
      
         **props**\ : *Partial*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setVectorTypeArrow

      .. rst-class:: sig-pretty-signature
      
         | setVectorTypeArrow(): *void*
      
      Set the visualization type to ARROW - normal arrows.
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setVectorTypeDynamicSymmetricArrow

      .. rst-class:: sig-pretty-signature
      
         | setVectorTypeDynamicSymmetricArrow(**scalarId**\ : *number*\ ): *void*
      
      Set the visualization type to DYNAMIC_SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow head directions determined by the sign of the scalar value at that point.
      
      Note that for mapped vectors on cutting planes, isosurfaces and isovolumes, if dynamicSymmetricArrows scalar does not match the scalar mapped to the cutting plane/isosurface/isovolume, then the vectors will not be displayed.
      
      **Parameters**
      
      
         **scalarId**\ : *number*
      
      
            The id of the scalar to use to determine arrow directions.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setVectorTypeReverseSymmetricArrow

      .. rst-class:: sig-pretty-signature
      
         | setVectorTypeReverseSymmetricArrow(): *void*
      
      Set the visualization type to REVERSE_SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing inward in both directions
      
      **Returns**\ : *void*
      



.. js:method:: cee.ug.VectorSettings.setVectorTypeSymmetricArrow

      .. rst-class:: sig-pretty-signature
      
         | setVectorTypeSymmetricArrow(): *void*
      
      Set the visualization type to SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing outwards in both directions
      
      **Returns**\ : *void*
      




