NodeSelectionItem

class Communicator.Selection.NodeSelectionItem()

A SelectionItem that is guaranteed to have a valid NodeId


Methods

equals

NodeSelectionItem.equals(selectionItem)

Determines if two selection items are equal.

Arguments
Return type

boolean

Returns

whether or not the two items are equal.

forJson

NodeSelectionItem.forJson()
Deprecated

Use toJson instead.

Return type

Object

getFaceEntity

NodeSelectionItem.getFaceEntity()

Gets the face entity for this selection.

Return type

FaceEntity() | null

Returns

the face entity if one was selected, otherwise null

getIncludeId

NodeSelectionItem.getIncludeId()
Deprecated

Use getInclusionKey instead.

Return type

SC.InclusionKey | null

getInclusionKey

NodeSelectionItem.getInclusionKey()

Gets the include id for this selection.

Return type

SC.InclusionKey | null

Returns

the inclusion key associated with this selection item

getLineEntity

NodeSelectionItem.getLineEntity()

Gets the line entity for this selection.

Return type

LineEntity() | null

Returns

the line entity if one was selected, otherwise null

getNodeId

NodeSelectionItem.getNodeId()
Return type

NodeId

getPointEntity

NodeSelectionItem.getPointEntity()

Gets the point entity for this selection.

Return type

PointEntity() | null

Returns

the point entity if one was selected, otherwise null

getPosition

NodeSelectionItem.getPosition()

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

Return type

Point3() | null

Returns

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

getSelectionType

NodeSelectionItem.getSelectionType()
Return type

SelectionType

isEntitySelection

NodeSelectionItem.isEntitySelection()
Return type

this

Returns

true if the object has the fields required for an EntitySelectionItem This function can be used as a TypeScript type guard.

isFaceSelection

NodeSelectionItem.isFaceSelection()
Return type

this

Returns

true if the object has the fields required for a FaceSelectionItem This function can be used as a TypeScript type guard.

isLineSelection

NodeSelectionItem.isLineSelection()
Return type

this

Returns

true if the object has the fields required for a LineSelectionItem This function can be used as a TypeScript type guard.

isNodeEntitySelection

NodeSelectionItem.isNodeEntitySelection()
Return type

this

Returns

true if the object has the fields required for a NodeEntitySelectionItem This function can be used as a TypeScript type guard.

isNodeSelection

NodeSelectionItem.isNodeSelection()
Return type

this

Returns

true if the object has the fields required for a NodeSelectionItem This function can be used as a TypeScript type guard.

isPointSelection

NodeSelectionItem.isPointSelection()
Return type

this

Returns

true if the object has the fields required for a PointSelectionItem This function can be used as a TypeScript type guard.

overlayIndex

NodeSelectionItem.overlayIndex()

Gets the overlay index for this selection.

Return type

OverlayIndex | null

Returns

the overlay index associated with this selection item

toJson

NodeSelectionItem.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.

static create

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity[, lineEntity[, pointEntity]])

Create a new FaceSelectionItem

Arguments
Return type

FaceSelectionItem()

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity, lineEntity[, pointEntity])

Create a new LineSelectionItem

Arguments
Return type

LineSelectionItem()

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity, lineEntity, pointEntity)

Create a new PointSelectionItem

Arguments
Return type

PointSelectionItem()

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity[, lineEntity[, pointEntity]])

Create a new EntitySelectionItem

Arguments
  • nodeId (NodeId | null | undefined) –

  • inclusionKey (SC.InclusionKey | null | undefined()) –

  • faceEntity (FaceEntity()) –

  • lineEntity (LineEntity() | null) – optional

  • pointEntity (PointEntity() | null) – optional

Return type

EntitySelectionItem()

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity, lineEntity[, pointEntity])

Create a new EntitySelectionItem

Arguments
  • nodeId (NodeId | null | undefined) –

  • inclusionKey (SC.InclusionKey | null | undefined()) –

  • faceEntity (FaceEntity() | null | undefined) –

  • lineEntity (LineEntity()) –

  • pointEntity (PointEntity() | null) – optional

Return type

EntitySelectionItem()

NodeSelectionItem.create(nodeId, inclusionKey, faceEntity, lineEntity, pointEntity)

Create a new EntitySelectionItem

Arguments
  • nodeId (NodeId | null | undefined) –

  • inclusionKey (SC.InclusionKey | null | undefined()) –

  • faceEntity (FaceEntity() | null | undefined) –

  • lineEntity (LineEntity() | null | undefined) –

  • pointEntity (PointEntity()) –

Return type

EntitySelectionItem()

NodeSelectionItem.create(nodeId[, inclusionKey[, faceEntity[, lineEntity[, pointEntity]]]])

Create a new NodeSelectionItem

Arguments
Return type

NodeSelectionItem()

NodeSelectionItem.create([nodeId[, inclusionKey[, faceEntity[, lineEntity[, pointEntity]]]]])

Create a new SelectionItem

Arguments
  • nodeId (NodeId | null) – optional

  • inclusionKey (SC.InclusionKey | null()) – optional

  • faceEntity (FaceEntity() | null) – optional

  • lineEntity (LineEntity() | null) – optional

  • pointEntity (PointEntity() | null) – optional

Return type

SelectionItem()