vispy.scene.cameras.fly.
FlyCamera
Bases: vispy.scene.cameras.perspective.PerspectiveCamera
vispy.scene.cameras.perspective.PerspectiveCamera
The fly camera provides a way to explore 3D data using an interaction style that resembles a flight simulator.
For this camera, the scale_factor indicates the speed of the camera in units per second, and the center indicates the position of the camera.
scale_factor
center
Field of view. Default 60.0.
Rotation to use.
Keyword arguments to pass to BaseCamera.
Notes
Interacting with this camera might need a bit of practice. The reaction to key presses can be customized by modifying the keymap property.
Moving:
arrow keys, or WASD to move forward, backward, left and right F and C keys move up and down Space bar to brake
arrow keys, or WASD to move forward, backward, left and right
F and C keys move up and down
Space bar to brake
Viewing:
Use the mouse while holding down LMB to control the pitch and yaw. Alternatively, the pitch and yaw can be changed using the keys IKJL The camera auto-rotates to make the bottom point down, manual rolling can be performed using Q and E.
Use the mouse while holding down LMB to control the pitch and yaw.
Alternatively, the pitch and yaw can be changed using the keys IKJL
The camera auto-rotates to make the bottom point down, manual rolling can be performed using Q and E.
auto_roll
Whether to rotate the camera automaticall to try and attempt to keep Z up.
keymap
A dictionary that maps keys to thruster directions
The keys in this dictionary are vispy key descriptions (from vispy.keys) or characters that represent keys. These are matched to the “key” attribute of key-press and key-release events.
The values are tuples, in which the first element specifies the magnitude of the acceleration, using negative values for “backward” thrust. A value of zero means to brake. The remaining elements specify the dimension to which the acceleration should be applied. These are 1, 2, 3 for forward/backward, left/right, up/down, and 4, 5, 6 for pitch, yaw, roll.
on_timer
Timer event handler
The event.
rotation
Get the full rotation. This rotation is composed of the normal rotation plus the extra rotation due to the current interaction of the user.
rotation1
rotation1 records confirmed camera rotation
rotation2
rotation2 records on going camera rotation.
viewbox_key_event
ViewBox key event handler
viewbox_mouse_event
ViewBox mouse event handler