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

.. role:: clio-static
   :class: clio-flag clio-flag-static


##########
LineMarkup
##########

.. js:class:: wv.Markup.Line.LineMarkup

   This class is for 3D line markup items.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Markup.Line.LineMarkup.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.Markup.Line.LineMarkup.className`
   * :js:data:`~wv.Markup.Line.LineMarkup.uniqueId`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~static wv.Markup.Line.LineMarkup.fromJson`
   * :js:meth:`~wv.Markup.Line.LineMarkup.draw`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getClassName`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getFirstNodeId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getFirstPoint`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getLineColor`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getLineOpacity`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getLinePattern`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getLinePatternLength`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getLinePatternLengthUnit`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getNodeId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getSecondNodeId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.getSecondPoint`
   * :js:meth:`~wv.Markup.Line.LineMarkup.hit`
   * :js:meth:`~wv.Markup.Line.LineMarkup.hitWithTolerance`
   * :js:meth:`~wv.Markup.Line.LineMarkup.onDeselect`
   * :js:meth:`~wv.Markup.Line.LineMarkup.onSelect`
   * :js:meth:`~wv.Markup.Line.LineMarkup.remove`
   * :js:meth:`~wv.Markup.Line.LineMarkup.removeLine`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setFirstNodeId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setFirstPoint`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setLineColor`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setLineOpacity`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setLinePattern`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setSecondNodeId`
   * :js:meth:`~wv.Markup.Line.LineMarkup.setSecondPoint`
   * :js:meth:`~wv.Markup.Line.LineMarkup.toJson`
   * :js:meth:`~wv.Markup.Line.LineMarkup.updateLine`
   
   



.. rst-class:: kind-group kind-constructors

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


.. js:method:: wv.Markup.Line.LineMarkup.constructor

      .. rst-class:: sig-pretty-signature
      
         | LineMarkup(**viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`\ , **firstPoint**\ : (*None* | :js:class:`Point3 <wv.Point3>`\ )?, **secondPoint**\ : (*None* | :js:class:`Point3 <wv.Point3>`\ )?, **firstNodeId**\ : (*None* | *number*\ )?, **secondNodeId**\ : (*None* | *number*\ )?): :js:class:`LineMarkup <wv.Markup.Line.LineMarkup>`
      
      **Parameters**
      
      
         **viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`
      
         **firstPoint**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ ) = null
      
         **secondPoint**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ ) = null
      
         **firstNodeId**\ : (*None* \| *number*\ ) = null
      
         **secondNodeId**\ : (*None* \| *number*\ ) = null
      
      
      **Returns**\ : :js:class:`LineMarkup <wv.Markup.Line.LineMarkup>`
      



.. rst-class:: kind-group kind-properties

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


.. js:data:: wv.Markup.Line.LineMarkup.className

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | className: *string*
      



.. js:data:: wv.Markup.Line.LineMarkup.uniqueId

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | uniqueId: *string*
      



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

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


.. js:method:: static wv.Markup.Line.LineMarkup.fromJson

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | fromJson(**objData**\ : *any*\ , **viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`\ ): *Promise*
      
      Creates a new [[LineMarkup]] from an object given by [[toJson]].
      
      **Parameters**
      
      
         **objData**\ : *any*
      
      
            object given by [[toJson]].
      
      
         **viewer**\ : :js:class:`IWebViewer <wv.IWebViewer>`
      
      
      **Returns**\ : *Promise*
      
      
         The prepared object.
      
      



.. js:method:: wv.Markup.Line.LineMarkup.draw

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | draw(**_renderer**\ : :js:class:`MarkupRenderer <wv.Markup.MarkupRenderer>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Called when the markup item should be redrawn on a specific view. This most typically happens when the scene is rendered.
      
      **Parameters**
      
      
         **_renderer**\ : :js:class:`MarkupRenderer <wv.Markup.MarkupRenderer>`
      
      
            renderer engine to draw.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the view to draw on.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.getClassName

      .. rst-class:: sig-pretty-signature
      
         | getClassName(): *string*
      
      Returns the class name for this markup item.
      
      **Returns**\ : *string*
      



.. js:method:: wv.Markup.Line.LineMarkup.getFirstNodeId

      .. rst-class:: sig-pretty-signature
      
         | getFirstNodeId(): (*None* | *number*\ )
      
      Gets the NodeId of the part associated with the first line point
      
      **Returns**\ : (*None* \| *number*\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getFirstPoint

      .. rst-class:: sig-pretty-signature
      
         | getFirstPoint(): (*None* | :js:class:`Point3 <wv.Point3>`\ )
      
      Gets the first point on the line.
      
      **Returns**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ )
      
      
         the first point, or null if none is set.
      
      



.. js:method:: wv.Markup.Line.LineMarkup.getId

      .. rst-class:: sig-pretty-signature
      
         | getId(): *string*
      
      Returns a unique markup id for this line.
      
      **Returns**\ : *string*
      



.. js:method:: wv.Markup.Line.LineMarkup.getLineColor

      .. rst-class:: sig-pretty-signature
      
         | getLineColor(): :js:class:`Color <wv.Color>`
      
      Gets the line color.
      
      **Returns**\ : :js:class:`Color <wv.Color>`
      



.. js:method:: wv.Markup.Line.LineMarkup.getLineOpacity

      .. rst-class:: sig-pretty-signature
      
         | getLineOpacity(): *number*
      
      Gets the line opacity.
      
      **Returns**\ : *number*
      



.. js:method:: wv.Markup.Line.LineMarkup.getLinePattern

      .. rst-class:: sig-pretty-signature
      
         | getLinePattern(): (*None* | :js:data:`LinePattern <wv.LinePattern>`\ )
      
      Gets the line pattern.
      
      **Returns**\ : (*None* \| :js:data:`LinePattern <wv.LinePattern>`\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getLinePatternLength

      .. rst-class:: sig-pretty-signature
      
         | getLinePatternLength(): (*None* | *number*\ )
      
      Gets the length of a single repetition of the line pattern.
      
      **Returns**\ : (*None* \| *number*\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getLinePatternLengthUnit

      .. rst-class:: sig-pretty-signature
      
         | getLinePatternLengthUnit(): (*None* | :js:data:`LinePatternLengthUnit <wv.Sc.LinePatternLengthUnit>`\ )
      
      Gets the unit in which the line pattern length is measured.
      
      **Returns**\ : (*None* \| :js:data:`LinePatternLengthUnit <wv.Sc.LinePatternLengthUnit>`\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getNodeId

      .. rst-class:: sig-pretty-signature
      
         | getNodeId(): (*None* | *number*\ )
      
      Gets the node id associated with the line markup.
      
      **Returns**\ : (*None* \| *number*\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getSecondNodeId

      .. rst-class:: sig-pretty-signature
      
         | getSecondNodeId(): (*None* | *number*\ )
      
      Gets the NodeId of the part associated with the second line point
      
      **Returns**\ : (*None* \| *number*\ )
      



.. js:method:: wv.Markup.Line.LineMarkup.getSecondPoint

      .. rst-class:: sig-pretty-signature
      
         | getSecondPoint(): (*None* | :js:class:`Point3 <wv.Point3>`\ )
      
      Gets the second point on the line.
      
      **Returns**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ )
      
      
         the second point, or null if none is set.
      
      



.. js:method:: wv.Markup.Line.LineMarkup.hit

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hit(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Markup.Line.LineMarkup.hitWithTolerance

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hitWithTolerance(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ , **_pickTolerance**\ : *number*\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
         **_pickTolerance**\ : *number*
      
      
            amount of tolerance allowed for a hit in pixels.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Markup.Line.LineMarkup.onDeselect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onDeselect(): *void*
      
      Called when this markup item is deselected by the system
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.onSelect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onSelect(**_view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Called when this markup item is selected by the system from a given view.
      
      **Parameters**
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the view where the selection occurred
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.remove

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | remove(**_view**\ : (*None* | :js:class:`IView <wv.IView>`\ )): *void*
      
      Called when the MarkupItem is removed from a view from the system. Any cleanup that needs to be done should be performed in this method.
      
      **Parameters**
      
      
         **_view**\ : (*None* \| :js:class:`IView <wv.IView>`\ )
      
      
            the view to remove from, null if removed from everywhere.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.removeLine

      .. rst-class:: sig-pretty-signature
      
         | removeLine(): *Promise*
      
      Removes the line geometry from the scene.
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.Markup.Line.LineMarkup.setFirstNodeId

      .. rst-class:: sig-pretty-signature
      
         | setFirstNodeId(**nodeId**\ : (*None* | *number*\ )): *void*
      
      Sets the NodeId of the part associated with the first line point
      
      **Parameters**
      
      
         **nodeId**\ : (*None* \| *number*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setFirstPoint

      .. rst-class:: sig-pretty-signature
      
         | setFirstPoint(**firstPoint**\ : (*None* | :js:class:`Point3 <wv.Point3>`\ )): *void*
      
      Sets the first point on the line.
      
      **Parameters**
      
      
         **firstPoint**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setId

      .. rst-class:: sig-pretty-signature
      
         | setId(**id**\ : *string*\ ): *void*
      
      Sets a markup id for this line.
      
      **Parameters**
      
      
         **id**\ : *string*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setLineColor

      .. rst-class:: sig-pretty-signature
      
         | setLineColor(**color**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the line color.
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color <wv.Color>`
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setLineOpacity

      .. rst-class:: sig-pretty-signature
      
         | setLineOpacity(**opacity**\ : *number*\ ): *void*
      
      Sets the line opacity.
      
      **Parameters**
      
      
         **opacity**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setLinePattern

      .. rst-class:: sig-pretty-signature
      
         | setLinePattern(**pattern**\ : :js:data:`LinePattern <wv.LinePattern>`\ , **patternLength**\ : *number*\ , **patternLengthUnit**\ : :js:data:`LinePatternLengthUnit <wv.Sc.LinePatternLengthUnit>`\ ): *void*
      
      Sets the line pattern.
      
      **Parameters**
      
      
         **pattern**\ : :js:data:`LinePattern <wv.LinePattern>`
      
      
            The line pattern.
      
      
         **patternLength**\ : *number*
      
      
            The length of a single repetition of the line pattern.
      
      
         **patternLengthUnit**\ : :js:data:`LinePatternLengthUnit <wv.Sc.LinePatternLengthUnit>`
      
      
            The unit in which the pattern length is measured.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setSecondNodeId

      .. rst-class:: sig-pretty-signature
      
         | setSecondNodeId(**nodeId**\ : (*None* | *number*\ )): *void*
      
      Sets the NodeId of the part associated with the second line point
      
      **Parameters**
      
      
         **nodeId**\ : (*None* \| *number*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.setSecondPoint

      .. rst-class:: sig-pretty-signature
      
         | setSecondPoint(**secondPoint**\ : (*None* | :js:class:`Point3 <wv.Point3>`\ )): *void*
      
      Sets the second point on the line.
      
      **Parameters**
      
      
         **secondPoint**\ : (*None* \| :js:class:`Point3 <wv.Point3>`\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Line.LineMarkup.toJson

      .. rst-class:: sig-pretty-signature
      
         | toJson(): *object*
      
      Creates an object ready for JSON serialization.
      
      **Returns**\ : *object*
      
      
         The prepared object.
      
      



.. js:method:: wv.Markup.Line.LineMarkup.updateLine

      .. rst-class:: sig-pretty-signature
      
         | updateLine(): *Promise*
      
      Draws updated line geometry in the scene.
      
      **Returns**\ : *Promise*
      




