LineEntity

class Communicator.Selection.LineEntity()

Encapsulates a line selection.


Methods

forJson

LineEntity.forJson()
Deprecated

Use toJson instead.

Return type

Object

getBestVertex

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.

Return type

Point3() | null

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

getBounding

LineEntity.getBounding()

Gets the bounding box for the line entity

Return type

Box()

Returns

Bounding box for the line entity

getLineBits

LineEntity.getLineBits()

Gets the kine bits for the selection Point.

Return type

number

Returns

The bits set on the line/edge.

getLineId

LineEntity.getLineId()

Gets the line identifier

Return type

number

Returns

the identifier of the line that was selected

getPoints

LineEntity.getPoints()
Return type

[Point3()]

getPosition

LineEntity.getPosition()

Gets the closest point on the selected line

Return type

Point3()

Returns

the closest point on the line

isCappingGeometry

LineEntity.isCappingGeometry()
Return type

boolean

overlayIndex

LineEntity.overlayIndex()
Return type

OverlayIndex

Returns

The index of the overlay the entity belongs to.

toJson

LineEntity.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.

static construct

LineEntity.construct(obj)
Deprecated

Use fromJson instead.

Arguments
  • obj (any()) –

Return type

LineEntity()

static fromJson

LineEntity.fromJson(objData)

Creates a new LineEntity from an object given by toJson

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

Return type

LineEntity()

Returns

The prepared object.