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

Communicator.OperatorManager.clear()

Removes all operators from the stack

Return type

void

getOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Navigate()) –

Return type

Communicator.Operator.CameraNavigationOperator

Returns

Operator reference

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Orbit()) –

Return type

Communicator.Operator.CameraOrbitOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Pan()) –

Return type

Communicator.Operator.CameraPanOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Zoom()) –

Return type

Communicator.Operator.CameraZoomOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.WindowZoom()) –

Return type

Communicator.Operator.CameraWindowZoomOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Walk()) –

Return type

Communicator.Operator.CameraKeyboardWalkOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.KeyboardWalk()) –

Return type

Communicator.Operator.CameraKeyboardWalkOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.WalkMode()) –

Return type

Communicator.Operator.CameraWalkModeOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Turntable()) –

Return type

Communicator.Operator.CameraTurntableOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Select()) –

Return type

Communicator.Operator.SelectionOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.AreaSelect()) –

Return type

Communicator.Operator.AreaSelectionOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.RayDrillSelect()) –

Return type

Communicator.Operator.RayDrillSelectionOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.RedlineCircle()) –

Return type

Communicator.Operator.RedlineCircleOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.RedlineText()) –

Return type

Communicator.Operator.RedlineTextOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.RedlineRectangle()) –

Return type

Communicator.Operator.RedlineRectangleOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.RedlinePolyline()) –

Return type

Communicator.Operator.RedlinePolylineOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasureEdgeLength()) –

Return type

Communicator.Operator.MeasureEdgeLengthOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasureFaceFaceDistance()) –

Return type

Communicator.Operator.MeasureFaceFaceDistanceOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasurePointPointDistance()) –

Return type

Communicator.Operator.MeasurePointPointDistanceOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasureFaceFaceAngle()) –

Return type

Communicator.Operator.MeasureFaceFaceAngleOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasurePolylineDistance()) –

Return type

Communicator.Operator.MeasurePolylineDistanceOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.MeasurePolygonArea()) –

Return type

Communicator.Operator.MeasurePolygonAreaOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Note()) –

Return type

Communicator.Operator.NoteOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Cutting()) –

Return type

CuttingPlaneOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.Handle()) –

Return type

Communicator.Operator.HandleOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId.NavCube()) –

Return type

Communicator.Operator.NavCubeOperator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.BuiltInOperatorId()) –

Return type

Communicator.Operator.Operator

Communicator.OperatorManager.getOperator(id)
Arguments
  • id (Communicator.OperatorId()) –

Return type

{  }

indexOf

Communicator.OperatorManager.indexOf(operatorId)

Returns the index of an operator on the stack

Arguments
  • operatorId (Communicator.OperatorId()) –

Return type

number

Returns

operator index or -1 if not found

injectEvent

Communicator.OperatorManager.injectEvent(event, eventType)
Arguments
  • event ({  }()) –

  • eventType (Communicator.EventType()) –

Return type

Promise[void]

peek

Communicator.OperatorManager.peek()
Return type

Communicator.OperatorId

Returns

the operator id at the top of the stack

pop

Communicator.OperatorManager.pop()

Removes an operator from the top of the stack

Return type

{  }

Returns

the operator id

push

Communicator.OperatorManager.push(operatorId)

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

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

Return type

boolean

Returns

boolean indicating success or failure

registerCustomOperator

Communicator.OperatorManager.registerCustomOperator(operator)

Registers a custom operator

Arguments
  • operator (Communicator.Operator.Operator()) –

Return type

Communicator.OperatorId

Returns

operatorId

remove

Communicator.OperatorManager.remove(operatorId)

Removes an operator from the stack

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

Return type

void

replaceOperator

Communicator.OperatorManager.replaceOperator(previousOperatorId, newOperatorId)

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

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

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

Return type

boolean

set

Communicator.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 (Communicator.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

Communicator.OperatorManager.size()
Return type

number

Returns

the operator stack size

unregisterCustomOperator

Communicator.OperatorManager.unregisterCustomOperator(operatorId)

Removes a custom operator from the registered operator list.

Arguments
  • operatorId (Communicator.OperatorId()) –

Return type

void