.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


#########
PartLines
#########

.. js:class:: cee.mrk.PartLines

   A part that can show lines in a :js:class:`MarkupModel <cee.mrk.MarkupModel>`\ .
   
   Use :js:meth:`MarkupModel.addLinesPart <cee.mrk.MarkupModel.addLinesPart>` to create a new instance of this class.
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.mrk.PartLines.color`
   * :js:func:`~cee.mrk.PartLines.customData`
   * :js:func:`~cee.mrk.PartLines.lineWidth`
   * :js:func:`~cee.mrk.PartLines.terminatorDrawMode`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.mrk.PartLines.clearTerminators`
   * :js:meth:`~cee.mrk.PartLines.rayIntersect`
   * :js:meth:`~cee.mrk.PartLines.setArrowEndTerminator`
   * :js:meth:`~cee.mrk.PartLines.setArrowStartTerminator`
   * :js:meth:`~cee.mrk.PartLines.setBarEndTerminator`
   * :js:meth:`~cee.mrk.PartLines.setBarStartTerminator`
   * :js:meth:`~cee.mrk.PartLines.setVertices`
   * :js:meth:`~cee.mrk.PartLines.setVerticesFloat32Array`
   
   



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

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


.. js:method:: cee.mrk.PartLines.color

      .. rst-class:: sig-pretty-signature
      
         | *get* color(): :js:class:`Color3Like <cee.Color3Like>`
      
      The single color of the part
      
      **Returns**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* color(**color**\ : :js:class:`Color3Like <cee.Color3Like>`\ ): *void*
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color3Like <cee.Color3Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.customData

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | *get* customData(): *any*
      
      Custom data for the part. This field is not used by EnvisionWeb.
      
      **Returns**\ : *any*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* customData(**data**\ : *any*\ ): *void*
      
      **Parameters**
      
      
         **data**\ : *any*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.lineWidth

      .. rst-class:: sig-pretty-signature
      
         | *get* lineWidth(): *number*
      
      Controls the line width (pixels)
      
      **Returns**\ : *number*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* lineWidth(**width**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **width**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.terminatorDrawMode

      .. rst-class:: sig-pretty-signature
      
         | *get* terminatorDrawMode(): :js:data:`LineTerminatorDrawMode <cee.mrk.LineTerminatorDrawMode>`
      
      The line terminator draw mode
      
      **Returns**\ : :js:data:`LineTerminatorDrawMode <cee.mrk.LineTerminatorDrawMode>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* terminatorDrawMode(**drawMode**\ : :js:data:`LineTerminatorDrawMode <cee.mrk.LineTerminatorDrawMode>`\ ): *void*
      
      **Parameters**
      
      
         **drawMode**\ : :js:data:`LineTerminatorDrawMode <cee.mrk.LineTerminatorDrawMode>`
      
      
      **Returns**\ : *void*
      



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

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


.. js:method:: cee.mrk.PartLines.clearTerminators

      .. rst-class:: sig-pretty-signature
      
         | clearTerminators(): *void*
      
      Clear start and end terminators
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.rayIntersect

      .. rst-class:: sig-pretty-signature
      
         | rayIntersect(**ray**\ : :js:class:`Ray <cee.Ray>`\ , **hitItem**\ : :js:class:`PartHitItem <cee.mrk.PartHitItem>`\ ): *boolean*
      
      Picking
      
      **Parameters**
      
      
         **ray**\ : :js:class:`Ray <cee.Ray>`
      
         **hitItem**\ : :js:class:`PartHitItem <cee.mrk.PartHitItem>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.mrk.PartLines.setArrowEndTerminator

      .. rst-class:: sig-pretty-signature
      
         | setArrowEndTerminator(**arrowHeadLengthInPixels**\ : *number*\ , **arrowHeadWidthInPixels**\ : *number*\ ): *void*
      
      Draw arrows at end of lines
      
      **Parameters**
      
      
         **arrowHeadLengthInPixels**\ : *number*
      
         **arrowHeadWidthInPixels**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.setArrowStartTerminator

      .. rst-class:: sig-pretty-signature
      
         | setArrowStartTerminator(**arrowHeadLengthInPixels**\ : *number*\ , **arrowHeadWidthInPixels**\ : *number*\ ): *void*
      
      Draw arrows at start of lines
      
      **Parameters**
      
      
         **arrowHeadLengthInPixels**\ : *number*
      
         **arrowHeadWidthInPixels**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.setBarEndTerminator

      .. rst-class:: sig-pretty-signature
      
         | setBarEndTerminator(**lengthInPixels**\ : *number*\ ): *void*
      
      Draw bars at end of lines
      
      **Parameters**
      
      
         **lengthInPixels**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.setBarStartTerminator

      .. rst-class:: sig-pretty-signature
      
         | setBarStartTerminator(**lengthInPixels**\ : *number*\ ): *void*
      
      Draw bars at start of lines
      
      **Parameters**
      
      
         **lengthInPixels**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.setVertices

      .. rst-class:: sig-pretty-signature
      
         | setVertices(**vertices**\ : *ArrayLike*\ ): *void*
      
      Sets the vertices for the lines.
      
      The coordinates need to be interleaved (x0, y0, z0, x1, y1, z1, ...)
      
      Lines will be drawn between [x0, y0, z0] and [x1, y1, z1], and between [x2, y2, z2] and [x3, y3, z3], ..., so the number of lines will be vertices.length / 6.
      
      In order to draw a continuous path connecting all the given points, use :js:class:`utils.PathGenerator <cee.utils.PathGenerator>`\ :
      
      .. code-block:: javascript
      
         const mrkModel = new cee.mrk.MarkupModel();
         const partLines = mrkModel.addLinesPart();
         const points: cee.Vec3[] = [ ... ];
         const vertices = cee.utils.PathGenerator.generateVerticesForPath(points);
         partLines.setVertices(vertices);
      
      **Parameters**
      
      
         **vertices**\ : *ArrayLike*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.mrk.PartLines.setVerticesFloat32Array

      .. rst-class:: sig-pretty-signature
      
         | setVerticesFloat32Array(**vertices**\ : *Float32Array*\ ): *void*
      
      Sets the vertices for the lines from a Float32Array.
      
      The coordinates need to be interleaved (x0, y0, z0, x1, y1, z1, ...)
      
      This is the most optimal setting as the PartLines will just hold a reference to the passed array and not copy any data.
      
      Lines will be drawn between [x0, y0, z0] and [x1, y1, z1], and between [x2, y2, z2] and [x3, y3, z3], ..., so the number of lines will be vertices.length / 6.
      
      **Parameters**
      
      
         **vertices**\ : *Float32Array*
      
      
      **Returns**\ : *void*
      




