fsleyes.profiles.scene3dviewprofile
This module provides the Scene3DViewProfile class, an interaction
Profile for Scene3DPanel views.
- class fsleyes.profiles.scene3dviewprofile.Scene3DViewProfile(viewPanel, overlayList, displayCtx)[source]
Bases:
fsleyes.profiles.ProfileThe
Scene3DViewProfileclass is aProfileforScene3DPanelviews. It defines mouse / keyboard handlers for interacting with theScene3DCanvascontained in the panel.The following modes are defined (see the
Profiledocumentation):rotateClicking and dragging the mouse rotates the scene
zoomMoving the mouse wheel zooms in and out.
panClicking and dragging the mouse pans the scene.
pickClicking changes the
DisplayContext.location- static supportedView()[source]
Specifies that this profile can only work with the
Scene3DPanelview.
- static tempModes()[source]
Returns the temporary mode map for the
Scene3DViewProfile, which controls the use of modifier keys to temporarily enter other interaction modes.
- static altHandlers()[source]
Returns the alternate handlers map, which allows event handlers defined in one mode to be re-used whilst in another mode.
- __init__(viewPanel, overlayList, displayCtx)[source]
Create a
Profileinstance.- Parameters
viewPanel – The
ViewPanelinstance for which thisProfileinstance defines mouse/keyboard interaction behaviour.overlayList – The
OverlayListinstance which contains the list of overlays being displayed.displayCtx – The
DisplayContextinstance which defines how the overlays are to be displayed.modes – A sequence of strings, containing the mode identifiers for this profile. These are added as options on the
modeproperty.
- getEventTargets()[source]
Returns a list containing the
Scene3DCanvas.
- resetDisplay()[source]
Resets the
Scene3DCanvascamera settings to their defaults.
- _rotateModeLeftMouseDown(ev, canvas, mousePos, canvasPos)[source]
Called on left mouse down events in
rotatemode. Saves the mouse position and current rotation matrix (theScene3DCanvas.rotationproperty).
- _rotateModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]
Called on left mouse drag events in
rotatemode. Modifies the canvas rotation matrix according to the X and Y mouse position (relative to the mouse down location).
- _rotateModeLeftMouseUp(ev, canvas, mousePos, canvasPos)[source]
Called on left mouse up events in
rotatemode. Clears the internal state used by the mouse down and drag handlers.
- _zoomModeMouseWheel(ev, canvas, wheel, mousePos, canvasPos)[source]
Called on mouse wheel events in
zoommode. Adjusts theScene3DCanvas.zoomproperty.
- _panModeLeftMouseDown(ev, canvas, mousePos, canvasPos)[source]
Called on mouse down events in
panmode. Saves the mouse position and currentScene3DCanvas.offsetvalue.
- _panModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]
Called on mouse drag events in
panmode. Adjusts theScene3DCanvas.offsetproperty.
- _panModeLeftMouseUp(ev, canvas, mousePos, canvasPos)[source]
Called on mouse up events in
panmode. Clears the internal state used by the down and drag handlers.
- _pickModeLeftMouseDown(ev, canvas, mousePos, canvasPos)[source]
Called on mouse down events in
pickmode.Updates the
DisplayContext.locationproperty.
- _pickModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]
Called on mouse drag events in
pickmode. Forwards the event to the_pickModeLeftMouseDown()method.
- __annotations__ = {}
- __module__ = 'fsleyes.profiles.scene3dviewprofile'