Methods
computeDisplayToWorld
Transform from display to world coordinates.
Argument | Type | Required | Description |
---|---|---|---|
renderer |
vtkRenderer | Yes | The vtkRenderer instance. |
x |
Number | Yes | |
y |
Number | Yes | |
z |
Number | Yes |
computeWorldToDisplay
Transform from world to display coordinates.
Argument | Type | Required | Description |
---|---|---|---|
renderer |
vtkRenderer | Yes | The vtkRenderer instance. |
x |
Number | Yes | |
y |
Number | Yes | |
z |
Number | Yes |
getEnabled
Get wether or not this InteractorObserver instance is enabled.
getInteractor
Retrieve the render window interactor instance.
getPriority
Get the priority.
getProcessEvents
Get whether or not the interactor observer instance should process events.
invokeEndInteractionEvent
Invoke an end interaction event.
Argument | Type | Required | Description |
---|---|---|---|
args |
Yes | Event payload. |
invokeInteractionEvent
Invoke an interaction event.
Argument | Type | Required | Description |
---|---|---|---|
args |
Yes | Event payload. |
invokeStartInteractionEvent
Invoke a start interaction event.
Argument | Type | Required | Description |
---|---|---|---|
args |
Yes | Event payload. |
onEndInteractionEvent
Registers a callback to be invoked when an end interaction event occurs.
Argument | Type | Required | Description |
---|---|---|---|
cb |
EventHandler | Yes | The callback to be called. |
priority |
Number | No | The callback to be called |
onInteractionEvent
Registers a callback to be invoked when an interaction event occurs.
Argument | Type | Required | Description |
---|---|---|---|
cb |
EventHandler | Yes | The callback to be called. |
priority |
Number | No | The priority of the event. |
onStartInteractionEvent
Registers a callback to be invoked when a start interaction event occurs.
Argument | Type | Required | Description |
---|---|---|---|
cb |
EventHandler | Yes | The callback to be called. |
priority |
Number | No | The callback to be called |
setEnabled
Enable/disable the interactor observer. Note that if you are enabling the interactor observer, an interactor instance must exists on the model.
Typically you can call setInteractor
Argument | Type | Required | Description |
---|---|---|---|
enable |
Boolean | Yes |
setInteractor
Set the interactor instance.
Argument | Type | Required | Description |
---|---|---|---|
interactor |
vtkRenderWindowInteractor | Yes |
setPriority
Set the priority.
Argument | Type | Required | Description |
---|---|---|---|
priority |
Number | Yes | The priority level. |
setProcessEvents
Set whether or not the interactor observer instance should process events.
Argument | Type | Required | Description |
---|---|---|---|
processEvents |
Boolean | Yes |
Source
import vtkRenderer from '../Renderer'; |
import macro from 'vtk.js/Sources/macros'; |