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

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()

Parameters

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

Parameters

Returns: CameraWindowZoomOperator

Operator reference

Parameters

id: Walk

Returns: CameraKeyboardWalkOperator

Operator reference

Parameters

Returns: CameraKeyboardWalkOperator

Operator reference

Parameters

Returns: CameraWalkModeOperator

Operator reference

Parameters

Returns: CameraTurntableOperator

Operator reference
getOperator(id: Select): SelectionOperator

Parameters

id: Select

Returns: SelectionOperator

Operator reference

Parameters

Returns: AreaSelectionOperator

Operator reference

Parameters

Returns: RayDrillSelectionOperator

Operator reference

Parameters

Returns: RedlineCircleOperator

Operator reference

Parameters

Returns: RedlineTextOperator

Operator reference

Parameters

Returns: RedlineRectangleOperator

Operator reference

Parameters

Returns: RedlinePolylineOperator

Operator reference

Parameters

Returns: MeasureEdgeLengthOperator

Operator reference

Parameters

Returns: MeasureFaceFaceDistanceOperator

Operator reference

Parameters

Returns: MeasurePointPointDistanceOperator

Operator reference

Parameters

Returns: MeasureFaceFaceAngleOperator

Operator reference

Parameters

Returns: MeasurePolylineDistanceOperator

Operator reference

Parameters

Returns: MeasurePolygonAreaOperator

Operator reference
getOperator(id: Note): NoteOperator

Parameters

id: Note

Returns: NoteOperator

Operator reference
getOperator(id: Cutting): CuttingPlaneOperator

Parameters

Returns: CuttingPlaneOperator

Operator reference
getOperator(id: Handle): HandleOperator

Parameters

id: Handle

Returns: HandleOperator

Operator reference
getOperator(id: NavCube): NavCubeOperator

Parameters

Returns: NavCubeOperator

Operator reference
getOperator(id: BuiltInOperatorId): Operator

Parameters

Returns: Operator

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

Parameters

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

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