vispy.scene.cameras.perspective module#
- class vispy.scene.cameras.perspective.Base3DRotationCamera(fov=0.0, **kwargs)#
Bases:
PerspectiveCamera
Base class for TurntableCamera and ArcballCamera
- property distance#
The user-set distance. If None (default), the distance is internally calculated from the scale factor and fov.
- viewbox_mouse_event(event)#
The viewbox received a mouse event; update transform accordingly.
- Parameters:
- eventinstance of Event
The event.
- class vispy.scene.cameras.perspective.PerspectiveCamera(fov=60.0, scale_factor=None, center=None, **kwargs)#
Bases:
BaseCamera
Base class for 3D cameras supporting orthographic and perspective projections.
- Parameters:
- fovfloat
Field of view. Default 60.0.
- scale_factorscalar
A measure for the scale/range of the scene that the camera should show. The exact meaning differs per camera type.
- **kwargsdict
Keyword arguments to pass to BaseCamera.
- property near_clip_distance#
The distance of the near clipping plane from the camera’s position.
- property scale_factor#
The measure for the scale or range that the camera should cover
For the PanZoomCamera and TurnTableCamera this translates to zooming: set to smaller values to zoom in.
- viewbox_mouse_event(event)#
The ViewBox received a mouse event; update transform accordingly. Default implementation adjusts scale factor when scolling.
- Parameters:
- eventinstance of Event
The event.
- viewbox_resize_event(event)#
The ViewBox resize handler to update the transform
- Parameters:
- eventinstance of Event
The event.