.. role:: ts-api-decorator

################
QueryElementInfo
################

.. js:module:: cee.ug
   :noindex:

.. container:: ts-api-section

   .. js:class:: QueryElementInfo

      Query information about elements for a given frame or all frames



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.ug.QueryElementInfo.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.ug.QueryElementInfo.elementIdentType`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.ug.QueryElementInfo.executeQuery`
   * :js:meth:`~cee.ug.QueryElementInfo.executeQueryByClientSideHitItems`





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

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

.. container:: ts-api-section

   .. js:function:: QueryElementInfo.constructor( model)

      :param model: None
      :type model: RemoteModel


      :rtype: QueryElementInfo



Accessors
=========

.. container:: ts-api-section

   .. js:function:: QueryElementInfo.elementIdentType()



      Specify whether the ``elementIdentArr`` parameter in ``executeQuery`` is to be interpreted as an array of IDs or indices.
      Defaults to IDs.


      :rtype: RemoteQueryInputIdentType

   .. js:function:: QueryElementInfo.elementIdentType( identType)

      :param identType: None
      :type identType: RemoteQueryInputIdentType


      :rtype: void



Methods
=======

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

executeQuery
------------

.. js:method:: QueryElementInfo.executeQuery( frameIndex, geometryIndex, partId, elementIdentArr, scalarResultId, vectorResultId, callback)

   :param frameIndex: The index of the frame to get info for. Specify -1 for all frames
   :type frameIndex: number
   :param geometryIndex: The index of the geometry the part belongs to. In most cases there is only one geometry and this parameter should be 0. Specify -1 to search in all geometries.
   :type geometryIndex: number
   :param partId: The id of the part containing the elements. Specify -1 to search in all parts.
   :type partId: number
   :param elementIdentArr: Array with ids or indices of the elements to get information for. Use ``elementIdentType`` to specify what this array contains.
   :type elementIdentArr: [number]
   :param scalarResultId: The id of the scalar to use for scalarResult. If -1 then the result currently shown as scalar fringes on the part will be used.
   :type scalarResultId: number
   :param vectorResultId: The id of the vector to use for vectorResults. If -1 then the vector results currently set in the modelSpec will be used.
   :type vectorResultId: number
   :param callback: Function getting called when the result is received from the server.
   :type callback: QueryElementInfoCallback


   Executes the query for the given elements.


   :rtype: void

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

executeQueryByClientSideHitItems
--------------------------------

.. js:method:: QueryElementInfo.executeQueryByClientSideHitItems( hitItems, scalarResultId, vectorResultId, callback)

   :param hitItems: The client-side hit items to execute the query over. Use ``RemoteModel.clientSideRayIntersect`` or ``TrianglePicker`` to create client-side hit items.
   :type hitItems: [ClientSideHitItem]
   :param scalarResultId: The id of the scalar to use for scalarResult. If -1 then the result currently shown as scalar fringes on the part will be used.
   :type scalarResultId: number
   :param vectorResultId: The id of the vector to use for vectorResults. If -1 then the vector results currently set in the modelSpec will be used.
   :type vectorResultId: number
   :param callback: Function getting called when the result is received from the server.
   :type callback: QueryElementInfoCallback


   Executes the query for the given ClientSideHitItem array.


   :rtype: void

