.. role:: ts-api-decorator

##########
LineEntity
##########

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: LineEntity



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Selection.LineEntity.getBestVertex`
   * :js:meth:`~Selection.LineEntity.getBounding`
   * :js:meth:`~Selection.LineEntity.getLineBits`
   * :js:meth:`~Selection.LineEntity.getLineId`
   * :js:meth:`~Selection.LineEntity.getPoints`
   * :js:meth:`~Selection.LineEntity.getPosition`
   * :js:meth:`~Selection.LineEntity.isCappingGeometry`
   * :js:meth:`~Selection.LineEntity.overlayIndex`
   * :js:meth:`~Selection.LineEntity.toJson`
   * :js:meth:`~Selection.LineEntity.fromJson`





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

Methods
=======

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

getBestVertex
-------------

.. js:method:: LineEntity.getBestVertex()



   Returns the vertex of the line that is closest to the selection
   point.

   Clipped vertices are skipped. If the vertex is occluded, then
   ``null`` is returned.


   :rtype: null | Point3

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

getBounding
-----------

.. js:method:: LineEntity.getBounding()



   Gets the bounding box for the line entity

   :returns: Bounding box for the line entity


   :rtype: Box

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

getLineBits
-----------

.. js:method:: LineEntity.getLineBits()



   Gets the kine bits for the selection Point.

   :returns: The bits set on the line/edge.


   :rtype: number

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

getLineId
---------

.. js:method:: LineEntity.getLineId()



   Gets the line identifier

   :returns: the identifier of the line that was selected


   :rtype: number

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

getPoints
---------

.. js:method:: LineEntity.getPoints()



   :rtype: [Point3]

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

getPosition
-----------

.. js:method:: LineEntity.getPosition()



   Gets the closest point on the selected line

   :returns: the closest point on the line


   :rtype: Point3

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

isCappingGeometry
-----------------

.. js:method:: LineEntity.isCappingGeometry()



   :rtype: boolean

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

overlayIndex
------------

.. js:method:: LineEntity.overlayIndex()





   :returns: The index of the overlay the entity belongs to.


   :rtype: number

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

toJson
------

.. js:method:: LineEntity.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

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

:ts-api-decorator:`static` fromJson
-----------------------------------

.. js:method:: LineEntity.fromJson( objData)

   :param objData: An object given by [[toJson]].
   :type objData: any


   Creates a new [[LineEntity]] from an object given by [[toJson]].

   :returns: The prepared object.


   :rtype: LineEntity

