pyvista.Plotter.reset_camera

pyvista.Plotter.reset_camera#

Plotter.reset_camera(render=True, bounds=None) None[ソース]#

アクティブなレンダウィンドウのカメラをリセットします.

カメラは,すべてのアクターが見えるようになるまで,カメラ位置から焦点まで定義されたベクトルに沿ってスライドします.

パラメータ:
renderbool, default: True

カメラをリセットした後にレンダーをトリガします.

boundsiterable(int), optional

Automatically set up the camera based on a specified bounding box (x_min, x_max, y_min, y_max, z_min, z_max).

メッシュを追加して,カメラの位置をメッシュに近づけすぎました. その後,カメラをリセットし,メッシュを表示します.

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> actor = pl.add_mesh(pv.Sphere(), show_edges=True)
>>> pl.set_position((0, 0.1, 0.1))
>>> pl.reset_camera()
>>> pl.show()
../../../_images/pyvista-Plotter-reset_camera-1_00_00.png