pyvista.Plotter.add_camera3d_widget#
- Plotter.add_camera3d_widget()[source]#
Add a camera3d widget allow to move the camera.
Note
This widget requires
vtk>=9.3.0.- Returns:
- vtkCamera3DWidget
The camera3d widget.
Examples
Add a camera3d widget to the scene.
>>> import pyvista as pv >>> sphere = pv.Sphere() >>> pl = pv.Plotter(shape=(1, 2)) >>> _ = pl.add_mesh(sphere, show_edges=True) >>> pl.subplot(0, 1) >>> _ = pl.add_mesh(sphere, show_edges=True) >>> _ = pl.add_camera3d_widget() >>> pl.show(cpos=pl.camera_position)