.. role:: ts-api-decorator

#######################
NodeEntitySelectionItem
#######################

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: NodeEntitySelectionItem

      A [[SelectionItem]] that is guaranteed to have a valid [[NodeId]] and entity.



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Selection.NodeEntitySelectionItem.equals`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getFaceEntity`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getInclusionKey`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getLineEntity`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getNodeId`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getPointEntity`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getPosition`
   * :js:meth:`~Selection.NodeEntitySelectionItem.getSelectionType`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isEntitySelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isFaceSelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isLineSelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isNodeEntitySelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isNodeSelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.isPointSelection`
   * :js:meth:`~Selection.NodeEntitySelectionItem.overlayIndex`
   * :js:meth:`~Selection.NodeEntitySelectionItem.toJson`





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

Methods
=======

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

equals
------

.. js:method:: NodeEntitySelectionItem.equals( selectionItem)

   :param selectionItem: The selection item to test against.
   :type selectionItem: SelectionItem


   Determines if two selection items are equal.

   :returns: whether or not the two items are equal.


   :rtype: boolean

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

getFaceEntity
-------------

.. js:method:: NodeEntitySelectionItem.getFaceEntity()



   Gets the face entity for this selection.

   :returns: the face entity if one was selected, otherwise null


   :rtype: null | FaceEntity

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

getInclusionKey
---------------

.. js:method:: NodeEntitySelectionItem.getInclusionKey()



   Gets the include id for this selection.

   :returns: the inclusion key associated with this selection item


   :rtype: null | InclusionKey

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

getLineEntity
-------------

.. js:method:: NodeEntitySelectionItem.getLineEntity()



   Gets the line entity for this selection.

   :returns: the line entity if one was selected, otherwise null


   :rtype: null | LineEntity

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

getNodeId
---------

.. js:method:: NodeEntitySelectionItem.getNodeId()



   Gets the part id for this selection.

   :returns: the part id associated with this selection item


   :rtype: number

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

getPointEntity
--------------

.. js:method:: NodeEntitySelectionItem.getPointEntity()



   Gets the point entity for this selection.

   :returns: the point entity if one was selected, otherwise null


   :rtype: null | PointEntity

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

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

.. js:method:: NodeEntitySelectionItem.getPosition()



   Convenience method for getting the world space position of the selection point.
   [[SelectionItem]]s with a type of [[SelectionType.Part]] will not have a position and null will be returned.

   :returns: World space position of the selection point if it can be determined.


   :rtype: Point3

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

getSelectionType
----------------

.. js:method:: NodeEntitySelectionItem.getSelectionType()



   :rtype: SelectionType

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

isEntitySelection
-----------------

.. js:method:: NodeEntitySelectionItem.isEntitySelection()





   :returns: true if the object has the fields required for an [[EntitySelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

isFaceSelection
---------------

.. js:method:: NodeEntitySelectionItem.isFaceSelection()





   :returns: true if the object has the fields required for a [[FaceSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

isLineSelection
---------------

.. js:method:: NodeEntitySelectionItem.isLineSelection()





   :returns: true if the object has the fields required for a [[LineSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

isNodeEntitySelection
---------------------

.. js:method:: NodeEntitySelectionItem.isNodeEntitySelection()





   :returns: true if the object has the fields required for a [[NodeEntitySelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

isNodeSelection
---------------

.. js:method:: NodeEntitySelectionItem.isNodeSelection()





   :returns: true if the object has the fields required for a [[NodeSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

isPointSelection
----------------

.. js:method:: NodeEntitySelectionItem.isPointSelection()





   :returns: true if the object has the fields required for a [[PointSelectionItem]]. This function can be used as a TypeScript [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).


   :rtype: this

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

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

.. js:method:: NodeEntitySelectionItem.overlayIndex()



   Gets the overlay index for this selection.

   :returns: the overlay index associated with this selection item


   :rtype: number

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

toJson
------

.. js:method:: NodeEntitySelectionItem.toJson()



   Creates an object ready for JSON serialization.

   :returns: The prepared object.


   :rtype: object

