.. role:: ts-api-decorator

##########
PartPoints
##########

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

.. container:: ts-api-section

   .. js:class:: PartPoints

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

      Use ``MarkupModel.addPointsPart`` 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.PartPoints.color`
   * :js:attr:`~cee.mrk.PartPoints.colorArray`
   * :js:attr:`~cee.mrk.PartPoints.customData`
   * :js:attr:`~cee.mrk.PartPoints.pointSize`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.mrk.PartPoints.rayIntersect`
   * :js:meth:`~cee.mrk.PartPoints.setColorArray`
   * :js:meth:`~cee.mrk.PartPoints.setColorArrayUint8Array`
   * :js:meth:`~cee.mrk.PartPoints.setVertices`
   * :js:meth:`~cee.mrk.PartPoints.setVerticesFloat32Array`





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

Accessors
=========

.. container:: ts-api-section

   .. js:function:: PartPoints.color()



      The single color of the part if no per-point color is specified with the colorArray() property


      :rtype: Color3Like

   .. js:function:: PartPoints.color( color)

      :param color: None
      :type color: Color3Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: PartPoints.colorArray()



      The Uint8Array with the per point colors (if any).

      Colors are interleaved in a Uint8Array with (r0,g0,b0,r1,g1,b1,...) ordering and each component being 0..255


      :rtype: Uint8Array



.. container:: ts-api-section

   .. js:function:: PartPoints.customData()



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


      :rtype: any

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

      :param data: None
      :type data: any


      :rtype: void



.. container:: ts-api-section

   .. js:function:: PartPoints.pointSize()



      Controls the point size


      :rtype: number

   .. js:function:: PartPoints.pointSize( pointSize)

      :param pointSize: None
      :type pointSize: number


      :rtype: void



Methods
=======

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

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

.. js:method:: PartPoints.rayIntersect( ray, hitItem)

   :param ray: None
   :type ray: Ray
   :param hitItem: None
   :type hitItem: PartHitItem


   Picking


   :rtype: boolean

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

setColorArray
-------------

.. js:method:: PartPoints.setColorArray( colorArr)

   :param colorArr: None
   :type colorArr: ArrayLike <number>


   Specify one color per point/vertex. 

   The size of the array must match the number of vertices (points) in the part.

   The colors needs to be interleaved (r0, g0, b0, r1, g1, b1, ...)


   :rtype: void

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

setColorArrayUint8Array
-----------------------

.. js:method:: PartPoints.setColorArrayUint8Array( colorArr)

   :param colorArr: None
   :type colorArr: Uint8Array


   Specify one color per point/vertex. 

   Colors needs to be specified in a Uint8Array with (r0,g0,b0,r1,g1,b1,...) ordering and each component being 0..255

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


   :rtype: void

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

setVertices
-----------

.. js:method:: PartPoints.setVertices( vertices)

   :param vertices: None
   :type vertices: ArrayLike <number>


   Sets the vertices for the points


   :rtype: void

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

setVerticesFloat32Array
-----------------------

.. js:method:: PartPoints.setVerticesFloat32Array( vertices)

   :param vertices: None
   :type vertices: Float32Array


   Sets the vertices for the points from a Float32Array

   The coordinates needs to be interleaved (x0, y0, z0, x1, y1, z1, ...)

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


   :rtype: void

