LineEntity

class Communicator.Selection.LineEntity()

Encapsulates a line selection.

Methods

forJson()

getBestVertex()

getBounding()

getLineBits()

getLineId()

getPoints()

getPosition()

isCappingGeometry()

overlayIndex()

toJson()

construct()

fromJson()


Methods

forJson

Communicator.Selection.LineEntity.forJson()

Note

forJson is deprecated: Use toJson instead.

Return type

Object

getBestVertex

Communicator.Selection.LineEntity.getBestVertex()

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

Return type

{  }

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

getBounding

Communicator.Selection.LineEntity.getBounding()

Gets the bounding box for the line entity

Return type

Communicator.Box

Returns

Bounding box for the line entity

getLineBits

Communicator.Selection.LineEntity.getLineBits()

Gets the kine bits for the selection Point.

Return type

number

Returns

The bits set on the line/edge.

getLineId

Communicator.Selection.LineEntity.getLineId()

Gets the line identifier

Return type

number

Returns

the identifier of the line that was selected

getPoints

Communicator.Selection.LineEntity.getPoints()
Return type

[Communicator.Point3]

getPosition

Communicator.Selection.LineEntity.getPosition()

Gets the closest point on the selected line

Return type

Communicator.Point3

Returns

the closest point on the line

isCappingGeometry

Communicator.Selection.LineEntity.isCappingGeometry()
Return type

boolean

overlayIndex

Communicator.Selection.LineEntity.overlayIndex()
Return type

Communicator.OverlayIndex

Returns

The index of the overlay the entity belongs to.

toJson

Communicator.Selection.LineEntity.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.

construct

Communicator.Selection.LineEntity.construct(obj)

Note

construct is deprecated: Use fromJson instead.

Arguments
  • obj (any()) –

Return type

Communicator.Selection.LineEntity

fromJson

Communicator.Selection.LineEntity.fromJson(objData)

Creates a new LineEntity from an object given by toJson

Arguments
  • objData (any()) – An object given by toJson

Return type

Communicator.Selection.LineEntity

Returns

The prepared object.