OperatorManager

class Communicator.OperatorManager()

Main interface into the Operator functionality of the viewer. The OperatorManager manages a number of operators in a stack and allows the user to register and unregister new operators.


Methods

clear

OperatorManager.clear()

Removes all operators from the stack

Return type

void

getOperator

OperatorManager.getOperator(id)
Arguments
Return type

CameraNavigationOperator()

Returns

Operator reference

OperatorManager.getOperator(id)
Arguments
Return type

CameraOrbitOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraPanOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraZoomOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraWindowZoomOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraKeyboardWalkOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraKeyboardWalkOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraWalkModeOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CameraTurntableOperator()

OperatorManager.getOperator(id)
Arguments
Return type

SelectionOperator()

OperatorManager.getOperator(id)
Arguments
Return type

AreaSelectionOperator()

OperatorManager.getOperator(id)
Arguments
Return type

RayDrillSelectionOperator()

OperatorManager.getOperator(id)
Arguments
Return type

RedlineCircleOperator()

OperatorManager.getOperator(id)
Arguments
Return type

RedlineTextOperator()

OperatorManager.getOperator(id)
Arguments
Return type

RedlineRectangleOperator()

OperatorManager.getOperator(id)
Arguments
Return type

RedlinePolylineOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasureEdgeLengthOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasureFaceFaceDistanceOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasurePointPointDistanceOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasureFaceFaceAngleOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasurePolylineDistanceOperator()

OperatorManager.getOperator(id)
Arguments
Return type

MeasurePolygonAreaOperator()

OperatorManager.getOperator(id)
Arguments
Return type

NoteOperator()

OperatorManager.getOperator(id)
Arguments
Return type

CuttingPlaneOperator()

OperatorManager.getOperator(id)
Arguments
Return type

HandleOperator()

OperatorManager.getOperator(id)
Arguments
Return type

NavCubeOperator()

OperatorManager.getOperator(id)
Arguments
Return type

Operator()

OperatorManager.getOperator(id)
Arguments
Return type

Operator() | null

indexOf

OperatorManager.indexOf(operatorId)

Returns the index of an operator on the stack

Arguments
Return type

number

Returns

operator index or -1 if not found

injectEvent

OperatorManager.injectEvent(event, eventType)
Arguments
Return type

Promise <void>

peek

OperatorManager.peek()
Return type

OperatorId

Returns

the operator id at the top of the stack

pop

OperatorManager.pop()

Removes an operator from the top of the stack

Return type

OperatorId | undefined

Returns

the operator id

push

OperatorManager.push(operatorId)

Adds an operator on the stack if it’s not already on the stack

Arguments
  • operatorId (OperatorId) – id of the operator to add to the stack

Return type

boolean

Returns

boolean indicating success or failure

registerCustomOperator

OperatorManager.registerCustomOperator(operator)

Registers a custom operator

Arguments
Return type

OperatorId

Returns

operatorId

remove

OperatorManager.remove(operatorId)

Removes an operator from the stack

Arguments
  • operatorId (OperatorId) – id of the operator to remove from the stack

Return type

void

replaceOperator

OperatorManager.replaceOperator(previousOperatorId, newOperatorId)

Replaces the operator that the specified id refers to. Returns a boolean indicating success or failure.

Arguments
  • previousOperatorId (OperatorId) – operator id for the operator to be replaced.

  • newOperatorId (OperatorId) – operator id for the new operator.

Return type

boolean

set

OperatorManager.set(operatorId, position)

Sets a position on the stack to an operator if it’s not already on the stack If there is already an operator in that position, it is replaced.

Arguments
  • operatorId (OperatorId) – id of the operator to add to the stack

  • position (number()) – position on the stack to assign

Return type

boolean

Returns

boolean indicating success or failure

size

OperatorManager.size()
Return type

number

Returns

the operator stack size

unregisterCustomOperator

OperatorManager.unregisterCustomOperator(operatorId)

Removes a custom operator from the registered operator list.

Arguments
Return type

void