pyvista.RenderWindowInteractor#

class RenderWindowInteractor(
plotter,
desired_update_rate=30,
light_follow_camera=True,
interactor=None,
)[source]#

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:
plotterpyvista.Plotter

Plotter object upon which the initialization of RenderWindowInteractor is based.

desired_update_ratefloat, default: 30

The desired update rate of the interactor.

light_follow_camerabool, default: True

If set to True, the light follows the camera.

interactorvtk.vtkRenderWindowInteractor, default: None

The render window interactor. If set to None, a new vtkRenderWindowInteractor instance will be created.

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.

RenderWindowInteractor.add_pick_obeserver(...)

Add an observer to call back when pick events end.

RenderWindowInteractor.add_pick_observer(...)

Add an observer to call back when pick events end.

RenderWindowInteractor.add_timer_event(...)

Add a function to callback as timer event.

RenderWindowInteractor.clear_events_for_key(key)

Remove the callbacks associated to the key.

RenderWindowInteractor.clear_key_event_callbacks()

Clear key event callbacks.

RenderWindowInteractor.close()

Close out the render window interactor.

RenderWindowInteractor.create_timer(duration)

Create a timer.

RenderWindowInteractor.destroy_timer(timer_id)

Destroy the given timer.

RenderWindowInteractor.enable_2d_style()

Set the interactive style to 2D.

RenderWindowInteractor.enable_custom_trackball_style([...])

Set the interactive style to a custom style based on Trackball Camera.

RenderWindowInteractor.enable_image_style()

Set the interactive style to Image.

RenderWindowInteractor.enable_joystick_actor_style()

Set the interactive style to Joystick Actor.

RenderWindowInteractor.enable_joystick_style()

Set the interactive style to Joystick Camera.

RenderWindowInteractor.enable_rubber_band_2d_style()

Set the interactive style to Rubber Band 2D.

RenderWindowInteractor.enable_rubber_band_style()

Set the interactive style to Rubber Band Picking.

RenderWindowInteractor.enable_terrain_style([...])

Set the interactive style to Terrain.

RenderWindowInteractor.enable_trackball_actor_style()

Set the interactive style to Trackball Actor.

RenderWindowInteractor.enable_trackball_style()

Set the interactive style to Trackball Camera.

RenderWindowInteractor.enable_zoom_style()

Set the interactive style to Rubber Band Zoom.

RenderWindowInteractor.fly_to(renderer, point)

Fly the interactor to the given point in a renderer.

RenderWindowInteractor.get_desired_update_rate()

Get the desired update rate.

RenderWindowInteractor.get_event_position()

Get the event position.

RenderWindowInteractor.get_event_subplot_loc()

Get the subplot location of the last event.

RenderWindowInteractor.get_interactor_style()

Get the interactor style.

RenderWindowInteractor.get_poked_renderer([x, y])

Get poked renderer for last or specific event position.

RenderWindowInteractor.initialize()

Initialize the interactor.

RenderWindowInteractor.key_press_event(*args)

Listen for key press event.

RenderWindowInteractor.poked_subplot()

Activate the subplot that was last interacted.

RenderWindowInteractor.process_events()

Process events.

RenderWindowInteractor.remove_observer(observer)

Remove an observer.

RenderWindowInteractor.remove_observers([event])

Remove all observers.

RenderWindowInteractor.reset_picker()

Reset the picker.

RenderWindowInteractor.set_render_window(...)

Set the render window for the interactor.

RenderWindowInteractor.start()

Start interactions.

RenderWindowInteractor.terminate_app()

Terminate the app.

RenderWindowInteractor.track_click_position([...])

Keep track of the click position.

RenderWindowInteractor.track_mouse_position(...)

Keep track of the mouse position.

RenderWindowInteractor.untrack_click_position([side])

Stop tracking the click position.

RenderWindowInteractor.untrack_mouse_position()

Stop tracking the mouse position.

RenderWindowInteractor.update_style()

Update the camera interactor style.

Attributes

RenderWindowInteractor.initialized

Return if the interactor has been initialized.

RenderWindowInteractor.picker

Get/set the picker.

RenderWindowInteractor.style

Return the current interactor style.