
##################
ElementHighlighter
##################

.. js:class:: cee.usg.ElementHighlighter

   Helper class for highlighting elements
   
   The class makes it easy to highlight an element by adding a tessellation of the element to a markup model, as well as creating a label with the element id/index.
   
   .. image:: /images/UsgElementHighligher.png
      :alt: None
   
   
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.usg.ElementHighlighter.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.usg.ElementHighlighter.addElementHighlight`
   * :js:meth:`~cee.usg.ElementHighlighter.addElementLabel`
   
   



.. rst-class:: kind-group kind-constructors

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


.. js:method:: cee.usg.ElementHighlighter.constructor

      .. rst-class:: sig-pretty-signature
      
         | ElementHighlighter(**usgModel**\ : :js:class:`UnstructGridModel <cee.usg.UnstructGridModel>`\ , **markupModel**\ : :js:class:`MarkupModel <cee.mrk.MarkupModel>`\ ): :js:class:`ElementHighlighter <cee.usg.ElementHighlighter>`
      
      Setup the object with the unstruct grid model with the FEA model, and the Markup Model which will receive the highlight parts constructed from the usgModel.
      
      **Parameters**
      
      
         **usgModel**\ : :js:class:`UnstructGridModel <cee.usg.UnstructGridModel>`
      
         **markupModel**\ : :js:class:`MarkupModel <cee.mrk.MarkupModel>`
      
      
      **Returns**\ : :js:class:`ElementHighlighter <cee.usg.ElementHighlighter>`
      



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

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


.. js:method:: cee.usg.ElementHighlighter.addElementHighlight

      .. rst-class:: sig-pretty-signature
      
         | addElementHighlight(**surfaceColor**\ : :js:class:`Color3 <cee.Color3>`\ , **state**\ : :js:class:`State <cee.usg.State>`\ , **partIndex**\ : *number*\ , **elementIndex**\ : *number*\ ): *boolean*
      
      Add a part with the tessellation of the given element as a surface with the given color. The part will use eye lift to not interfere with the usg model.
      
      See example image above for how it will look
      
      **Parameters**
      
      
         **surfaceColor**\ : :js:class:`Color3 <cee.Color3>`
      
         **state**\ : :js:class:`State <cee.usg.State>`
      
         **partIndex**\ : *number*
      
         **elementIndex**\ : *number*
      
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | addElementHighlight(**surfaceColor**\ : :js:class:`Color3 <cee.Color3>`\ , **hitItem**\ : :js:class:`HitItem <cee.usg.HitItem>`\ ): *boolean*
      
      Add a part with the tessellation of the given element as a surface with the given color. The part will use eye lift to not interfere with the usg model.
      
      See example image above for how it will look
      
      **Parameters**
      
      
         **surfaceColor**\ : :js:class:`Color3 <cee.Color3>`
      
         **hitItem**\ : :js:class:`HitItem <cee.usg.HitItem>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.usg.ElementHighlighter.addElementLabel

      .. rst-class:: sig-pretty-signature
      
         | addElementLabel(**state**\ : :js:class:`State <cee.usg.State>`\ , **partIndex**\ : *number*\ , **elementIndex**\ : *number*\ , **label**\ : *string*\ ): *boolean*
      
      Add an element label based on either a hit item or specified by state, part and element index.
      
      See example image above for how it will look
      
      **Parameters**
      
      
         **state**\ : :js:class:`State <cee.usg.State>`
      
         **partIndex**\ : *number*
      
         **elementIndex**\ : *number*
      
         **label**\ : *string*
      
      
      **Returns**\ : *boolean*
      
      .. rst-class:: sig-pretty-signature
      
         | addElementLabel(**hitItem**\ : :js:class:`HitItem <cee.usg.HitItem>`\ ): *boolean*
      
      Add an element label based on either a hit item or specified by state, part and element index.
      
      See example image above for how it will look
      
      **Parameters**
      
      
         **hitItem**\ : :js:class:`HitItem <cee.usg.HitItem>`
      
      
      **Returns**\ : *boolean*
      




