vispy.scene.cameras.base_camera.
BaseCamera
Bases: vispy.scene.node.Node
vispy.scene.node.Node
Base camera class.
The Camera describes the perspective from which a ViewBox views its subscene, and the way that user interaction affects that perspective.
Most functionality is implemented in subclasses. This base class has no user interaction and causes the subscene to use the same coordinate system as the ViewBox.
Whether the camera processes mouse and keyboard events.
For each dimension, specify whether it is flipped.
The direction that is considered up. Default ‘+z’. Not all camera’s may support this (yet).
The parent of the camera.
Name used to identify the camera in the scene.
center
The center location for this camera
The exact meaning of this value differs per type of camera, but generally means the point of interest or the rotation point.
depth_value
The depth value to use in orthographic and perspective projection
For orthographic projections, depth_value is the distance between the near and far clipping planes. For perspective projections, it is the ratio between the near and far clipping plane distances.
GL has a fixed amount of precision in the depth buffer, and a fixed constant will not work for both a very large range and very high precision. This property provides the user a way to override the default value if necessary.
flip
fov
Field-of-view angle of the camera. If 0, the camera is in orthographic mode.
get_state
Get the current view state of the camera
Returns a dict of key-value pairs. The exact keys depend on the camera. Can be passed to set_state() (of this or another camera of the same type) to reproduce the state.
List of properties to include in the returned dict. If None, all of camera state is returned.
interactive
Boolean describing whether the camera should enable or disable user interaction.
link
Link this camera with another camera of the same type
Linked camera’s keep each-others’ state in sync.
The other camera to link.
List of camera state properties to keep in sync between the two cameras. If None, all of camera state is kept in sync.
An axis to link between two PanZoomCamera instances. If not None, view limits in the selected axis only will be kept in sync between the cameras.
on_canvas_change
Canvas change event handler
The event.
pre_transform
A transform to apply to the beginning of the scene transform, in addition to anything else provided by this Camera.
reset
Reset the view to the default state.
set_default_state
Set the current state to be the default state to be applied when calling reset().
set_range
Set the range of the view region for the camera
X range.
Y range.
Z range.
Margin to use.
Notes
The view is set to the given range or to the scene boundaries if ranges are not specified. The ranges should be 2-element tuples specifying the min and max for each dimension.
For the PanZoomCamera the view is fully defined by the range. For e.g. the TurntableCamera the elevation and azimuth are not set. One should use reset() for that.
set_state
Set the view state of the camera
Should be a dict (or kwargs) as returned by get_state. It can be an incomlete dict, in which case only the specified properties are set.
The camera state.
Unused keyword arguments.
up
The dimension that is considered up.
view_changed
Called when this camera is changes its view. Also called when its associated with a viewbox.
viewbox
The viewbox that this camera applies to.
viewbox_key_event
ViewBox key event handler
viewbox_mouse_event
Viewbox mouse event handler
viewbox_resize_event
The ViewBox resize handler to update the transform
zoom_factor
nested_getattr
nested_setattr