.. role:: ts-api-decorator

#######
HitItem
#######

.. js:module:: cee.cug
   :noindex:

.. container:: ts-api-section

   .. js:class:: HitItem

      An object describing the result of a picking action on a ``ConstantRemoteModel``.

      Returned by ``ConstantRemoteModel.rayIntersect``



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-interface

   * :js:attr:`~cee.cug.HitItem.elementId`
   * :js:attr:`~cee.cug.HitItem.elementIndex`
   * :js:attr:`~cee.cug.HitItem.elementLocalSurface`
   * :js:attr:`~cee.cug.HitItem.elementScalarResult`
   * :js:attr:`~cee.cug.HitItem.elementTriangleVertices`
   * :js:attr:`~cee.cug.HitItem.elementType`
   * :js:attr:`~cee.cug.HitItem.frameIndex`
   * :js:attr:`~cee.cug.HitItem.intersectionPoint`
   * :js:attr:`~cee.cug.HitItem.intersectionPointNormal`
   * :js:attr:`~cee.cug.HitItem.nodeId`
   * :js:attr:`~cee.cug.HitItem.nodeIndex`
   * :js:attr:`~cee.cug.HitItem.nodePosition`
   * :js:attr:`~cee.cug.HitItem.nodeScalarResult`
   * :js:attr:`~cee.cug.HitItem.objectIndex`
   * :js:attr:`~cee.cug.HitItem.objectType`
   * :js:attr:`~cee.cug.HitItem.serverItemIdent`





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

Properties
==========

.. container:: ts-api-section

   .. js:attribute:: HitItem.elementId

      :type: number

      The id of the element in the data model on the server that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.elementIndex

      :type: number

      The index of the element in the data model on the server that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.elementLocalSurface

      :type: number

      The type of the element in the data model on the server that was hit, for example 'Quad', 'Tetrahedron', 'Hexahedron'



.. container:: ts-api-section

   .. js:attribute:: HitItem.elementScalarResult

      :type: number

      The scalar result in the closest node as indicated by ``nodeId``/``nodeIndex``.



.. container:: ts-api-section

   .. js:attribute:: HitItem.elementTriangleVertices

      :type: [number]

      A tessellation of triangles of the element that was hit. 

      This array contains x,y,z values for each triangle vertex. So there will be 9 values (3 vertices * (x,y,z)) per triangle.
      This can be used to highlight the selected element using the geometry or the markup model.



.. container:: ts-api-section

   .. js:attribute:: HitItem.elementType

      :type: string

      The type of the element in the data model on the server that was hit, for example 'Quad', 'Tetrahedron', 'Hexahedron'



.. container:: ts-api-section

   .. js:attribute:: HitItem.frameIndex

      :type: number

      The index of the frame in which the picking occurred



.. container:: ts-api-section

   .. js:attribute:: HitItem.intersectionPoint

      :type: Vec3

      The 3d point (in world coordinates) on the surface that was hit. 

      This is the actual point that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.intersectionPointNormal

      :type: Vec3

      The normal of the surface at the point where the surface was hit.



.. container:: ts-api-section

   .. js:attribute:: HitItem.nodeId

      :type: number

      The id of the node in the data model on the server that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.nodeIndex

      :type: number

      The index of the node in the data model on the server that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.nodePosition

      :type: Vec3

      The position of the node in the data model on the server that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.nodeScalarResult

      :type: number

      The scalar result in the closest node as indicated by ``nodeId``/``nodeIndex``.



.. container:: ts-api-section

   .. js:attribute:: HitItem.objectIndex

      :type: number

      The index of the object (part/iso/cut/isovol) that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.objectType

      :type: ObjectType

      The type of object (part/iso/cut/isovol) that was hit



.. container:: ts-api-section

   .. js:attribute:: HitItem.serverItemIdent

      :type: ServerItemIdent

      Object identifying the hit item. Can be used for query



