# 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.

  ## Index

  Methods

  - `clear`
  - `get`
  - `getOperator`
  - `indexOf`
  - `injectEvent`
  - `peek`
  - `pop`
  - `push`
  - `registerCustomOperator`
  - `remove`
  - `replaceOperator`
  - `set`
  - `size`
  - `unregisterCustomOperator`

## Methods

`OperatorManager.``clear`()
  clear(): void

  Removes all operators from the stack

  Returns: void

`OperatorManager.``get`()
  get(position: number): `OperatorId`

  Parameters

  > position: number

  Returns: `OperatorId`

  > the operator id at the given position of the stack Will return OperatorId.Invalid if position is out of bounds.

`OperatorManager.``getOperator`()
  getOperator(id: `Navigate`): `CameraNavigationOperator`

  Parameters

  > id: `Navigate`

  Returns: `CameraNavigationOperator`

  > Operator reference

  getOperator(id: `Orbit`): `CameraOrbitOperator`

  Parameters

  > id: `Orbit`

  Returns: `CameraOrbitOperator`

  > Operator reference

  getOperator(id: `Pan`): `CameraPanOperator`

  Parameters

  > id: `Pan`

  Returns: `CameraPanOperator`

  > Operator reference

  getOperator(id: `Zoom`): `CameraZoomOperator`

  Parameters

  > id: `Zoom`

  Returns: `CameraZoomOperator`

  > Operator reference

  getOperator(id: `WindowZoom`): `CameraWindowZoomOperator`

  Parameters

  > id: `WindowZoom`

  Returns: `CameraWindowZoomOperator`

  > Operator reference

  getOperator(id: `Walk`): `CameraKeyboardWalkOperator`

  Parameters

  > id: `Walk`

  Returns: `CameraKeyboardWalkOperator`

  > Operator reference

  getOperator(id: `KeyboardWalk`): `CameraKeyboardWalkOperator`

  Parameters

  > id: `KeyboardWalk`

  Returns: `CameraKeyboardWalkOperator`

  > Operator reference

  getOperator(id: `WalkMode`): `CameraWalkModeOperator`

  Parameters

  > id: `WalkMode`

  Returns: `CameraWalkModeOperator`

  > Operator reference

  getOperator(id: `Turntable`): `CameraTurntableOperator`

  Parameters

  > id: `Turntable`

  Returns: `CameraTurntableOperator`

  > Operator reference

  getOperator(id: `Select`): `SelectionOperator`

  Parameters

  > id: `Select`

  Returns: `SelectionOperator`

  > Operator reference

  getOperator(id: `AreaSelect`): `AreaSelectionOperator`

  Parameters

  > id: `AreaSelect`

  Returns: `AreaSelectionOperator`

  > Operator reference

  getOperator(id: `RayDrillSelect`): `RayDrillSelectionOperator`

  Parameters

  > id: `RayDrillSelect`

  Returns: `RayDrillSelectionOperator`

  > Operator reference

  getOperator(id: `RedlineCircle`): `RedlineCircleOperator`

  Parameters

  > id: `RedlineCircle`

  Returns: `RedlineCircleOperator`

  > Operator reference

  getOperator(id: `RedlineText`): `RedlineTextOperator`

  Parameters

  > id: `RedlineText`

  Returns: `RedlineTextOperator`

  > Operator reference

  getOperator(id: `RedlineRectangle`): `RedlineRectangleOperator`

  Parameters

  > id: `RedlineRectangle`

  Returns: `RedlineRectangleOperator`

  > Operator reference

  getOperator(id: `RedlinePolyline`): `RedlinePolylineOperator`

  Parameters

  > id: `RedlinePolyline`

  Returns: `RedlinePolylineOperator`

  > Operator reference

  getOperator(id: `MeasureEdgeLength`): `MeasureEdgeLengthOperator`

  Parameters

  > id: `MeasureEdgeLength`

  Returns: `MeasureEdgeLengthOperator`

  > Operator reference

  getOperator(id: `MeasureFaceFaceDistance`): `MeasureFaceFaceDistanceOperator`

  Parameters

  > id: `MeasureFaceFaceDistance`

  Returns: `MeasureFaceFaceDistanceOperator`

  > Operator reference

  getOperator(id: `MeasurePointPointDistance`): `MeasurePointPointDistanceOperator`

  Parameters

  > id: `MeasurePointPointDistance`

  Returns: `MeasurePointPointDistanceOperator`

  > Operator reference

  getOperator(id: `MeasureFaceFaceAngle`): `MeasureFaceFaceAngleOperator`

  Parameters

  > id: `MeasureFaceFaceAngle`

  Returns: `MeasureFaceFaceAngleOperator`

  > Operator reference

  getOperator(id: `MeasurePolylineDistance`): `MeasurePolylineDistanceOperator`

  Parameters

  > id: `MeasurePolylineDistance`

  Returns: `MeasurePolylineDistanceOperator`

  > Operator reference

  getOperator(id: `MeasurePolygonArea`): `MeasurePolygonAreaOperator`

  Parameters

  > id: `MeasurePolygonArea`

  Returns: `MeasurePolygonAreaOperator`

  > Operator reference

  getOperator(id: `Note`): `NoteOperator`

  Parameters

  > id: `Note`

  Returns: `NoteOperator`

  > Operator reference

  getOperator(id: `Cutting`): `CuttingPlaneOperator`

  Parameters

  > id: `Cutting`

  Returns: `CuttingPlaneOperator`

  > Operator reference

  getOperator(id: `Handle`): `HandleOperator`

  Parameters

  > id: `Handle`

  Returns: `HandleOperator`

  > Operator reference

  getOperator(id: `NavCube`): `NavCubeOperator`

  Parameters

  > id: `NavCube`

  Returns: `NavCubeOperator`

  > Operator reference

  getOperator(id: `BuiltInOperatorId`): `Operator`

  Parameters

  > id: `BuiltInOperatorId`

  Returns: `Operator`

  > Operator reference

  getOperator(id: `OperatorId`): (None | `Operator`)

  Parameters

  > id: `OperatorId`

  Returns: (None | `Operator`)

  > Operator reference

`OperatorManager.``indexOf`()
  indexOf(operatorId: `OperatorId`): number

  Returns the index of an operator on the stack

  Parameters

  > operatorId: `OperatorId`

  Returns: number

  > operator index or -1 if not found

`OperatorManager.``injectEvent`()
  injectEvent(event: (`KeyInputEvent` | `MouseInputEvent` | `MouseWheelInputEvent` | `TouchInputEvent`), eventType: `EventType`): Promise

  Parameters

  > event: (`KeyInputEvent` | `MouseInputEvent` | `MouseWheelInputEvent` | `TouchInputEvent`)

  > eventType: `EventType`

  Returns: Promise

`OperatorManager.``peek`()
  peek(): `OperatorId`

  Returns: `OperatorId`

  > the operator id at the top of the stack

`OperatorManager.``pop`()
  pop(): (undefined | `OperatorId`)

  Removes an operator from the top of the stack

  Returns: (undefined | `OperatorId`)

  > the operator id

`OperatorManager.``push`()
  push(operatorId: `OperatorId`): boolean

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

  Parameters

  > operatorId: `OperatorId`

  > > id of the operator to add to the stack

  Returns: boolean

  > boolean indicating success or failure

`OperatorManager.``registerCustomOperator`()
  registerCustomOperator(operator: `Operator`): `OperatorId`

  Registers a custom operator

  Parameters

  > operator: `Operator`

  Returns: `OperatorId`

  > operatorId

`OperatorManager.``remove`()
  remove(operatorId: `OperatorId`): void

  Removes an operator from the stack

  Parameters

  > operatorId: `OperatorId`

  > > id of the operator to remove from the stack

  Returns: void

`OperatorManager.``replaceOperator`()
  replaceOperator(previousOperatorId: `OperatorId`, newOperatorId: `OperatorId`): boolean

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

  Parameters

  > previousOperatorId: `OperatorId`

  > > operator id for the operator to be replaced.

  > newOperatorId: `OperatorId`

  > > operator id for the new operator.

  Returns: boolean

`OperatorManager.``set`()
  set(operatorId: `OperatorId`, position: number): boolean

  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.

  Parameters

  > operatorId: `OperatorId`

  > > id of the operator to add to the stack

  > position: number

  > > position on the stack to assign

  Returns: boolean

  > boolean indicating success or failure

`OperatorManager.``size`()
  size(): number

  Returns: number

  > the operator stack size

`OperatorManager.``unregisterCustomOperator`()
  unregisterCustomOperator(operatorId: `OperatorId`): void

  Removes a custom operator from the registered operator list.

  Parameters

  > operatorId: `OperatorId`

  Returns: void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...