OperatorManager

class 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
  • id (Navigate()) – None

Returns

Operator reference

Return type

CameraNavigationOperator

OperatorManager.getOperator(id)
Arguments
  • id (Orbit()) – None

Return type

CameraOrbitOperator

OperatorManager.getOperator(id)
Arguments
  • id (Pan()) – None

Return type

CameraPanOperator

OperatorManager.getOperator(id)
Arguments
  • id (Zoom()) – None

Return type

CameraZoomOperator

OperatorManager.getOperator(id)
Arguments
  • id (WindowZoom()) – None

Return type

CameraWindowZoomOperator

OperatorManager.getOperator(id)
Arguments
  • id (Walk()) – None

Return type

CameraKeyboardWalkOperator

OperatorManager.getOperator(id)
Arguments
  • id (KeyboardWalk()) – None

Return type

CameraKeyboardWalkOperator

OperatorManager.getOperator(id)
Arguments
  • id (WalkMode()) – None

Return type

CameraWalkModeOperator

OperatorManager.getOperator(id)
Arguments
  • id (Turntable()) – None

Return type

CameraTurntableOperator

OperatorManager.getOperator(id)
Arguments
  • id (Select()) – None

Return type

SelectionOperator

OperatorManager.getOperator(id)
Arguments
  • id (AreaSelect()) – None

Return type

AreaSelectionOperator

OperatorManager.getOperator(id)
Arguments
  • id (RayDrillSelect()) – None

Return type

RayDrillSelectionOperator

OperatorManager.getOperator(id)
Arguments
  • id (RedlineCircle()) – None

Return type

RedlineCircleOperator

OperatorManager.getOperator(id)
Arguments
  • id (RedlineText()) – None

Return type

RedlineTextOperator

OperatorManager.getOperator(id)
Arguments
  • id (RedlineRectangle()) – None

Return type

RedlineRectangleOperator

OperatorManager.getOperator(id)
Arguments
  • id (RedlinePolyline()) – None

Return type

RedlinePolylineOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasureEdgeLength()) – None

Return type

MeasureEdgeLengthOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasureFaceFaceDistance()) – None

Return type

MeasureFaceFaceDistanceOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasurePointPointDistance()) – None

Return type

MeasurePointPointDistanceOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasureFaceFaceAngle()) – None

Return type

MeasureFaceFaceAngleOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasurePolylineDistance()) – None

Return type

MeasurePolylineDistanceOperator

OperatorManager.getOperator(id)
Arguments
  • id (MeasurePolygonArea()) – None

Return type

MeasurePolygonAreaOperator

OperatorManager.getOperator(id)
Arguments
  • id (Note()) – None

Return type

NoteOperator

OperatorManager.getOperator(id)
Arguments
  • id (Cutting()) – None

Return type

CuttingPlaneOperator

OperatorManager.getOperator(id)
Arguments
  • id (Handle()) – None

Return type

HandleOperator

OperatorManager.getOperator(id)
Arguments
Return type

NavCubeOperator

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

Return type

Operator

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

Return type

null | Operator

indexOf

OperatorManager.indexOf(operatorId)
Arguments
  • operatorId (OperatorId()) – None

Returns the index of an operator on the stack

Returns

operator index or -1 if not found

Return type

number

injectEvent

OperatorManager.injectEvent(event, eventType)
Arguments
  • event (MouseInputEvent | MouseWheelInputEvent | KeyInputEvent | TouchInputEvent()) – None

  • eventType (EventType()) – None

Return type

Promise <void>

peek

OperatorManager.peek()
Returns

the operator id at the top of the stack

Return type

OperatorId

pop

OperatorManager.pop()

Removes an operator from the top of the stack

Returns

the operator id

Return type

undefined | OperatorId

push

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

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

Returns

boolean indicating success or failure

Return type

boolean

registerCustomOperator

OperatorManager.registerCustomOperator(operator)
Arguments
  • operator (Operator()) – None

Registers a custom operator

Returns

operatorId

Return type

OperatorId

remove

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

Removes an operator from the stack

Return type

void

replaceOperator

OperatorManager.replaceOperator(previousOperatorId, newOperatorId)
Arguments
  • previousOperatorId (OperatorId()) – operator id for the operator to be replaced.

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

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

Return type

boolean

set

OperatorManager.set(operatorId, position)
Arguments
  • operatorId (OperatorId()) – id of the operator to add to the stack

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

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.

Returns

boolean indicating success or failure

Return type

boolean

size

OperatorManager.size()
Returns

the operator stack size

Return type

number

unregisterCustomOperator

OperatorManager.unregisterCustomOperator(operatorId)
Arguments
  • operatorId (OperatorId()) – None

Removes a custom operator from the registered operator list.

Return type

void