pyvista.Camera#
- class Camera(renderer=None)[source]#
PyVista wrapper for the VTK Camera class.
- Parameters:
- renderer
pyvista.Renderer
,optional
Renderer to attach the camera to.
- renderer
Examples
Create a camera at the pyvista module level.
>>> import pyvista as pv >>> camera = pv.Camera()
Access the active camera of a plotter and get the position of the camera.
>>> pl = pv.Plotter() >>> pl.camera.position (1.0, 1.0, 1.0)
Methods
Return a deep copy of the camera.
Disable the use of parallel projection.
Enable parallel projection.
Camera.from_paraview_pvcc
(filename)Load a Paraview camera file (.pvcc extension).
Reset the camera clipping range based on the bounds of the visible actors.
Camera.tight
([padding, ...])Adjust the camera position so that the actors fill the entire renderer.
Camera.to_paraview_pvcc
(filename)Write the camera parameters to a Paraview camera file (.pvcc extension).
Camera.view_frustum
([aspect])Get the view frustum.
Camera.zoom
(value)Set the zoom of the camera.
Attributes
Return or set the azimuth of the camera.
Return or set the location of the clipping planes.
Vector from the camera position to the focal point.
Return or set the distance of the focal point from the camera.
Return or set the vertical rotation of the scene.
Location of the camera's focus in world coordinates.
Get or set whether this camera has been configured.
Return or set the camera's model transformation matrix.
Return the state of the parallel projection.
Return or set the scaling used for a parallel projection.
Return or set the position of the camera in world coordinates.
Return or set the roll of the camera about the direction of projection.
Return or set the distance between clipping planes.
Return or set the "up" of the camera.
Return or set the camera view angle.