pyvista.Camera.model_transform_matrix

pyvista.Camera.model_transform_matrix#

property Camera.model_transform_matrix[source]#

Return or set the camera’s model transformation matrix.

Examples

>>> import pyvista as pv
>>> import numpy as np
>>> pl = pv.Plotter()
>>> pl.camera.model_transform_matrix
array([[1., 0., 0., 0.],
       [0., 1., 0., 0.],
       [0., 0., 1., 0.],
       [0., 0., 0., 1.]])
>>> pl.camera.model_transform_matrix = np.array(
...     [
...         [1.0, 0.0, 0.0, 0.0],
...         [0.0, 1.0, 0.0, 0.0],
...         [0.0, 0.0, 1.0, 0.0],
...         [0.0, 0.0, 0.0, 0.5],
...     ]
... )
>>>
array([[1., 0., 0., 0.],
       [0., 1., 0., 0.],
       [0., 0., 1., 0.],
       [0., 0., 0., 0.5]])
../../../_images/pyvista-Camera-model_transform_matrix-1_00_00.png