.. role:: ts-api-decorator

##########
PartArrows
##########

.. js:module:: cee.mrk
   :noindex:

.. container:: ts-api-section

   .. js:class:: PartArrows

      A part that can show arrows in a ``MarkupModel``.

      Use ``MarkupModel.addArrowsPart`` to create a new instance of this class.



.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.mrk.PartArrows.color`
   * :js:attr:`~cee.mrk.PartArrows.customData`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.mrk.PartArrows.addArrow`
   * :js:meth:`~cee.mrk.PartArrows.rayIntersect`
   * :js:meth:`~cee.mrk.PartArrows.removeAllArrows`
   * :js:meth:`~cee.mrk.PartArrows.setArrows`
   * :js:meth:`~cee.mrk.PartArrows.setArrowsFloat32Array`





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

Accessors
=========

.. container:: ts-api-section

   .. js:function:: PartArrows.color()



      The single color of all arrows


      :rtype: Color3Like

   .. js:function:: PartArrows.color( color)

      :param color: None
      :type color: Color3Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: PartArrows.customData()



      Custom data for the part. This field is not used by EnvisionWeb.


      :rtype: any

   .. js:function:: PartArrows.customData( data)

      :param data: None
      :type data: any


      :rtype: void



Methods
=======

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

addArrow
--------

.. js:method:: PartArrows.addArrow( position, direction)

   :param position: None
   :type position: Vec3Like
   :param direction: None
   :type direction: Vec3Like


   Add an arrow with position and direction to the part


   :rtype: void

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

rayIntersect
------------

.. js:method:: PartArrows.rayIntersect( _ray, _hitItem)

   :param _ray: None
   :type _ray: Ray
   :param _hitItem: None
   :type _hitItem: PartHitItem


   Not implemented, always returns false


   :rtype: boolean

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

removeAllArrows
---------------

.. js:method:: PartArrows.removeAllArrows()



   Remove all arrows from the part


   :rtype: void

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

setArrows
---------

.. js:method:: PartArrows.setArrows( vertexArray, vectorArray)

   :param vertexArray: None
   :type vertexArray: ArrayLike <number>
   :param vectorArray: None
   :type vectorArray: ArrayLike <number>


   Sets the arrows by providing the vertices (start points) and the vectors (direction and length)

   The coordinates and vectors need to be interleaved (x0, y0, z0, x1, y1, z1, ...)


   :rtype: void

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

setArrowsFloat32Array
---------------------

.. js:method:: PartArrows.setArrowsFloat32Array( vertexArray, vectorArray)

   :param vertexArray: None
   :type vertexArray: Float32Array
   :param vectorArray: None
   :type vectorArray: Float32Array


   Sets the arrows by providing the vertices (start points) and the vectors (direction and length)

   The coordinates and vectors need to be interleaved (x0, y0, z0, x1, y1, z1, ...)

   This is the most optimal setting as the PartArrows will just hold a reference to the passed array and 
   not copy any data.


   :rtype: void

