fsleyes.profiles.scene3dviewprofile¶
This module provides the Scene3DViewProfile class, an interaction
Profile for Scene3DPanel views.
-
class
fsleyes.profiles.scene3dviewprofile.Scene3DViewProfile(viewPanel, overlayList, displayCtx)¶ 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.vertexIndexorDisplayContext.location-
__init__(viewPanel, overlayList, displayCtx)¶ 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.
- viewPanel – The
-
getEventTargets()¶ Returns a list containing the
Scene3DCanvas.
-
resetDisplay()¶ Resets the
Scene3DCanvascamera settings to their defaults.
-
_rotateModeLeftMouseDown(ev, canvas, mousePos, canvasPos)¶ Called on left mouse down events in
rotatemode. Saves the mouse position and current rotation matrix (theScene3DCanvas.rotationproperty).
-
_rotateModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)¶ 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)¶ 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)¶ Called on mouse wheel events in
zoommode. Adjusts theScene3DCanvas.zoomproperty.
-
_panModeLeftMouseDown(ev, canvas, mousePos, canvasPos)¶ Called on mouse down events in
panmode. Saves the mouse position and currentScene3DCanvas.offsetvalue.
-
_panModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)¶ Called on mouse drag events in
panmode. Adjusts theScene3DCanvas.offsetproperty.
-
_panModeLeftMouseUp(ev, canvas, mousePos, canvasPos)¶ Called on mouse up events in
panmode. Clears the internal state used by the down and drag handlers.
-
_pickModeLeftMouseDown(ev, canvas, mousePos, canvasPos)¶ Called on mouse down events in
pickmode.Updates the
DisplayContext.vertexIndexproperty if the currently selected overlay is aMesh, otherwise updates theDisplayContext.locationproperty.
-
_pickModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)¶ Called on mouse drag events in
pickmode. Forwards the event to the_pickModeLeftMouseDown()method.
-
__module__= 'fsleyes.profiles.scene3dviewprofile'¶
-