diffrp.viewer.mpl#

Experimental. Implementation and interface subject to change.

class diffrp.viewer.mpl.Viewer(scene, init_azim: int = 0, init_elev: int = 0, init_origin: list = [0, 0, 0], max_layers: int = 1)#

Bases: object

View a scene by constructing the viewer, with the initial camera placed with the specified pose. Requires matplotlib to be installed.

If you need semi-transparency you can tune up max_layers to the overdraw you want to support, but the performance would be lower.

Use WASDQE to navigate around the scene, and rotate the view by holding the right mouse button.

__init__(scene, init_azim: int = 0, init_elev: int = 0, init_origin: list = [0, 0, 0], max_layers: int = 1)#
on_key_down(event)#
on_key_up(event)#
on_motion(event)#
on_press(event)#
on_release(event)#
rebuild_camera()#
refresh(frame)#
render()#
update()#