pyvista.Camera

class Camera(renderer=None)

PyVista wrapper for the VTK Camera class.

Parameters
rendererpyvista.Renderer, optional

Renderer to attach the camera to.

Examples

Create a camera at the pyvista module level.

>>> import pyvista
>>> camera = pyvista.Camera()

Access the active camera of a plotter and get the position of the camera.

>>> pl = pyvista.Plotter()
>>> pl.camera.position
(1.0, 1.0, 1.0)
../../../_images/pyvista-Camera-1_00_00.png

Methods

Camera.copy()

Return a deep copy of the camera.

Camera.disable_parallel_projection()

Disable the use of perspective projection.

Camera.enable_parallel_projection()

Enable parallel projection.

Camera.reset_clipping_range()

Reset the camera clipping range based on the bounds of the visible actors.

Camera.view_frustum([aspect])

Get the view frustum.

Camera.zoom(value)

Set the zoom of the camera.

Attributes

Camera.azimuth

Azimuth of the camera.

Camera.clipping_range

Return or set the location of the clipping planes.

Camera.direction

Vector from the camera position to the focal point.

Camera.distance

Return or set the distance from the camera position to the focal point.

Camera.elevation

Vertical rotation of the scene.

Camera.focal_point

Location of the camera's focus in world coordinates.

Camera.is_parallel_projection

Return True if parallel projection is set.

Camera.model_transform_matrix

Return or set the camera's model transformation matrix.

Camera.parallel_projection

Return the state of the parallel projection.

Camera.parallel_scale

Return or set the scaling used for a parallel projection.

Camera.position

Return or set the position of the camera in world coordinates.

Camera.roll

Rotate the camera about the direction of projection.

Camera.thickness

Return or set the distance between clipping planes.

Camera.up

Return or set the "up" of the camera.

Camera.view_angle

Return or set the camera view angle.