.. role:: ts-api-decorator

###########
MarkupModel
###########

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

.. container:: ts-api-section

   .. js:class:: MarkupModel

      This class can be used to add markup items to a visualization.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.mrk.MarkupModel.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.mrk.MarkupModel.ignoreViewClipping`
   * :js:attr:`~cee.mrk.MarkupModel.name`
   * :js:attr:`~cee.mrk.MarkupModel.partCount`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.mrk.MarkupModel.addArrowsPart`
   * :js:meth:`~cee.mrk.MarkupModel.addImageLabelPart`
   * :js:meth:`~cee.mrk.MarkupModel.addIndexedTrianglesPart`
   * :js:meth:`~cee.mrk.MarkupModel.addLabelsPart`
   * :js:meth:`~cee.mrk.MarkupModel.addLinesPart`
   * :js:meth:`~cee.mrk.MarkupModel.addPointsPart`
   * :js:meth:`~cee.mrk.MarkupModel.addTexturedIndexedTrianglesPart`
   * :js:meth:`~cee.mrk.MarkupModel.deleteAllParts`
   * :js:meth:`~cee.mrk.MarkupModel.deletePart`
   * :js:meth:`~cee.mrk.MarkupModel.deletePartAt`
   * :js:meth:`~cee.mrk.MarkupModel.getBoundingBox`
   * :js:meth:`~cee.mrk.MarkupModel.getDefaultCameraConfig`
   * :js:meth:`~cee.mrk.MarkupModel.getPartAt`
   * :js:meth:`~cee.mrk.MarkupModel.rayIntersect`





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

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

.. container:: ts-api-section

   .. js:function:: MarkupModel.constructor()



      Constructor


      :rtype: MarkupModel



Accessors
=========

.. container:: ts-api-section

   .. js:function:: MarkupModel.ignoreViewClipping()



      Enable or disable option to ignore view clipping in this model


      :rtype: boolean

   .. js:function:: MarkupModel.ignoreViewClipping( ignore)

      :param ignore: None
      :type ignore: boolean


      :rtype: void



.. container:: ts-api-section

   .. js:function:: MarkupModel.name()



      Name of the markup model.


      :rtype: string

   .. js:function:: MarkupModel.name( name)

      :param name: None
      :type name: string


      Name of the model. 

      Mainly used for debugging.


      :rtype: void



.. container:: ts-api-section

   .. js:function:: MarkupModel.partCount()



      The number of parts in the model.


      :rtype: number



Methods
=======

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

addArrowsPart
-------------

.. js:method:: MarkupModel.addArrowsPart()



   Adds a part for drawing points. Use the returned ``PartPoints`` to add points to the new part.


   :rtype: PartArrows

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

addImageLabelPart
-----------------

.. js:method:: MarkupModel.addImageLabelPart()



   Add a part with an image attached to a 3d coordinate


   :rtype: PartImageLabel

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

addIndexedTrianglesPart
-----------------------

.. js:method:: MarkupModel.addIndexedTrianglesPart()



   Adds a part containing indexed triangles to the markup model. Use the returned ``PartIndexedTriangles``
   to set the mesh data and color of the new part.


   :rtype: PartIndexedTriangles

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

addLabelsPart
-------------

.. js:method:: MarkupModel.addLabelsPart()



   Adds a part containing positioned text labels to the markup model. Use the returned ``PartLabels`` to add text labels
   to the new part.


   :rtype: PartLabels

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

addLinesPart
------------

.. js:method:: MarkupModel.addLinesPart()



   Adds a part for drawing lines. Use the returned ``PartLines`` to add lines to the new part.


   :rtype: PartLines

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

addPointsPart
-------------

.. js:method:: MarkupModel.addPointsPart()



   Adds a part for drawing points. Use the returned ``PartPoints`` to add points to the new part.


   :rtype: PartPoints

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

addTexturedIndexedTrianglesPart
-------------------------------

.. js:method:: MarkupModel.addTexturedIndexedTrianglesPart()



   Adds a part containing textured indexed triangles to the markup model. Use the returned ``PartTexturedIndexedTriangles``
   to set the mesh data and texture of the new part.


   :rtype: PartTexturedIndexedTriangles

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

deleteAllParts
--------------

.. js:method:: MarkupModel.deleteAllParts()



   Deletes all parts in model


   :rtype: void

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

deletePart
----------

.. js:method:: MarkupModel.deletePart( part)

   :param part: None
   :type part: Part


   Delete the given part if present. 

   Returns true if the part was found and deleted, false if not.


   :rtype: boolean

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

deletePartAt
------------

.. js:method:: MarkupModel.deletePartAt( partIndex)

   :param partIndex: None
   :type partIndex: number


   Deletes the part at the given (zero-based) index.


   :rtype: void

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

getBoundingBox
--------------

.. js:method:: MarkupModel.getBoundingBox([ _options])

   :param _options: :ts-api-decorator:`optional` None
   :type _options: ModelBoundingBoxOptions


   Returns the ``BoundingBox`` (in world coordinates) of the model.

   Note that currently this method does not support any ``ModelBoundingBoxOptions``


   :rtype: BoundingBox

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

getDefaultCameraConfig
----------------------

.. js:method:: MarkupModel.getDefaultCameraConfig()



   Returns default camera configuration, which is always null for this model.


   :rtype: unknown

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

getPartAt
---------

.. js:method:: MarkupModel.getPartAt( partIndex)

   :param partIndex: None
   :type partIndex: number


   Returns an active reference to the part at the given (zero-based) index.


   :rtype: Part

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

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

.. js:method:: MarkupModel.rayIntersect( ray, ignoreLabels)

   :param ray: None
   :type ray: Ray
   :param ignoreLabels: None
   :type ignoreLabels: boolean


   Performs picking on the model.

   If something was hit, returns a HitItem containing information about the part and primitive that was hit.

   If nothing was hit, returns null.

   Labels have a "special treatment" ray intersect where hitting the label will cause a hit on the label attachment point.
   This is not always what is intended, e.g. when doing zoom to cursor. Set ignoreLabels to true to skip
   labels when doing ray intersect.


   :rtype: HitItem

