pyvista.RenderWindowInteractor#
- class RenderWindowInteractor(
- plotter,
- desired_update_rate=30,
- light_follow_camera=True,
- interactor=None,
Wrap vtk.vtkRenderWindowInteractor.
This class has been added for the purpose of making some methods we add to the RenderWindowInteractor more python, like certain testing methods.
- Parameters:
- plotter
pyvista.Plotter
Plotter object upon which the initialization of RenderWindowInteractor is based.
- desired_update_rate
float
, default: 30 The desired update rate of the interactor.
- light_follow_camerabool, default:
True
If set to
True
, the light follows the camera.- interactor
vtk.vtkRenderWindowInteractor
, default:None
The render window interactor. If set to
None
, a new vtkRenderWindowInteractor instance will be created.
- plotter
Methods
RenderWindowInteractor.add_key_event
(key, ...)Add a function to callback when the given key is pressed.
RenderWindowInteractor.add_observer
(event, call)Add an observer for the given event.
Add an observer to call back when pick events end.
Add an observer to call back when pick events end.
Add a function to callback as timer event.
Remove the callbacks associated to the key.
Clear key event callbacks.
Close out the render window interactor.
RenderWindowInteractor.create_timer
(duration)Create a timer.
RenderWindowInteractor.destroy_timer
(timer_id)Destroy the given timer.
Set the interactive style to 2D.
Set the interactive style to a custom style based on Trackball Camera.
Set the interactive style to Image.
Set the interactive style to Joystick Actor.
Set the interactive style to Joystick Camera.
Set the interactive style to Rubber Band 2D.
Set the interactive style to Rubber Band Picking.
Set the interactive style to Terrain.
Set the interactive style to Trackball Actor.
Set the interactive style to Trackball Camera.
Set the interactive style to Rubber Band Zoom.
RenderWindowInteractor.fly_to
(renderer, point)Fly the interactor to the given point in a renderer.
Get the desired update rate.
Get the event position.
Get the subplot location of the last event.
Get the interactor style.
Get poked renderer for last or specific event position.
Initialize the interactor.
Listen for key press event.
Activate the subplot that was last interacted.
Process events.
RenderWindowInteractor.remove_observer
(observer)Remove an observer.
Remove all observers.
Reset the picker.
Set the render window for the interactor.
Start interactions.
Terminate the app.
Keep track of the click position.
Keep track of the mouse position.
Stop tracking the click position.
Stop tracking the mouse position.
Update the camera interactor style.
Attributes
Return if the interactor has been initialized.
Get/set the picker.
Return the current interactor style.