arbitrary_rotation_camera#
- class ArbitraryRotationCamera(fov=45.0, elevation=30.0, azimuth=30.0, roll=0.0, distance=None, translate_speed=1.0, **kwargs)[source]#
Bases:
TurntableCamera
3D camera class that orbits around a center point while maintaining a view on a center point.
For this camera, the
scale_factor
indicates the zoom level, and thecenter
indicates the position to put at the center of the view.- Parameters:
fov (float) – Field of view. Zero (default) means orthographic projection.
elevation (float) – Elevation angle in degrees. Positive angles place the camera above the center point, negative angles place the camera below the center point.
azimuth (float) – Azimuth angle in degrees. Zero degrees places the camera on the positive x-axis, pointing in the negative x direction.
roll (float) – Roll angle in degrees
distance (float | None) – The distance of the camera from the rotation point (only makes sense if fov > 0). If None (default) the distance is determined from the scale_factor and fov.
**kwargs (dict) – Keyword arguments to pass to BaseCamera.
Notes
Interaction:
LMB: orbits the view around its center point.
RMB or scroll: change scale_factor (i.e. zoom level)
SHIFT + LMB: translate the center point
SHIFT + RMB: change FOV
- orbit(azim, elev)[source]#
Orbits the camera around the center position.
- Parameters:
azim (float) – Angle in degrees to rotate horizontally around the center point.
elev (float) – Angle in degrees to rotate vertically around the center point.
- viewbox_mouse_event(event)[source]#
The viewbox received a mouse event; update transform accordingly.
- Parameters:
event (instance of Event) – The event.
- property elevation#
The angle of the camera in degrees above the horizontal (x, z) plane.